module Language.Drasil.Data.ODELibPckg (
ODELibPckg(..), mkODELib, mkODELibNoPath
) where
import Language.Drasil.Code.ExternalLibrary (ExternalLibrary)
import Language.Drasil.Code.ExternalLibraryCall (ExternalLibraryCall)
import Language.Drasil.Code.Lang (Lang)
import Language.Drasil.Data.ODEInfo (ODEInfo)
import Language.Drasil.Mod (Name, Version)
data ODELibPckg = ODELib {
ODELibPckg -> Name
libName :: Name,
ODELibPckg -> Name
libVers :: Version,
ODELibPckg -> ExternalLibrary
libSpec :: ExternalLibrary,
ODELibPckg -> ODEInfo -> ExternalLibraryCall
libCall :: ODEInfo -> ExternalLibraryCall,
ODELibPckg -> Maybe Name
libPath :: Maybe FilePath,
ODELibPckg -> [Lang]
compatibleLangs :: [Lang]
}
mkODELib :: Name -> Version -> ExternalLibrary -> (ODEInfo ->
ExternalLibraryCall) -> FilePath -> [Lang] -> ODELibPckg
mkODELib :: Name
-> Name
-> ExternalLibrary
-> (ODEInfo -> ExternalLibraryCall)
-> Name
-> [Lang]
-> ODELibPckg
mkODELib Name
n Name
v ExternalLibrary
e ODEInfo -> ExternalLibraryCall
c Name
f = Name
-> Name
-> ExternalLibrary
-> (ODEInfo -> ExternalLibraryCall)
-> Maybe Name
-> [Lang]
-> ODELibPckg
ODELib Name
n Name
v ExternalLibrary
e ODEInfo -> ExternalLibraryCall
c (Name -> Maybe Name
forall a. a -> Maybe a
Just Name
f)
mkODELibNoPath :: Name -> Version -> ExternalLibrary -> (ODEInfo ->
ExternalLibraryCall) -> [Lang] -> ODELibPckg
mkODELibNoPath :: Name
-> Name
-> ExternalLibrary
-> (ODEInfo -> ExternalLibraryCall)
-> [Lang]
-> ODELibPckg
mkODELibNoPath Name
n Name
v ExternalLibrary
e ODEInfo -> ExternalLibraryCall
c = Name
-> Name
-> ExternalLibrary
-> (ODEInfo -> ExternalLibraryCall)
-> Maybe Name
-> [Lang]
-> ODELibPckg
ODELib Name
n Name
v ExternalLibrary
e ODEInfo -> ExternalLibraryCall
c Maybe Name
forall a. Maybe a
Nothing