Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ScriptSession = ScriptSession {}
- data ScriptSessionError
- data LoadSymbolError
- type ModName = String
- type FuncName = String
- initScriptSession :: [String] -> IO (Either ScriptSessionError ScriptSession)
- addImport :: String -> Ghc ()
- showType :: DynFlags -> Type -> String
- mkTypeForName :: String -> Ghc Type
- compileScript :: Type -> Text -> Ghc (Either ScriptCompilationError a)
- typeCheckScript :: Type -> Text -> Ghc (Maybe ScriptCompilationError)
- mangleSymbol :: Maybe String -> String -> String -> String
- data ObjectLoadMode
- type ModuleDirectory = FilePath
- loadFunctionFromDirectory :: ObjectLoadMode -> ModName -> FuncName -> FilePath -> FilePath -> IO (Either LoadSymbolError a)
- loadFunction :: ObjectLoadMode -> ModName -> FuncName -> FilePath -> IO (Either LoadSymbolError a)
- prefixUnderscore :: String
Documentation
data ScriptSession Source #
data ScriptSessionError Source #
Instances
Show ScriptSessionError Source # | |
Defined in ProjectM36.ScriptSession |
initScriptSession :: [String] -> IO (Either ScriptSessionError ScriptSession) Source #
Configure a GHC environment/session which we will use for all script compilation.
compileScript :: Type -> Text -> Ghc (Either ScriptCompilationError a) Source #
typeCheckScript :: Type -> Text -> Ghc (Maybe ScriptCompilationError) Source #
data ObjectLoadMode Source #
LoadObjectFile | load .o files only |
LoadDLLFile | load .so .dynlib .dll files only |
LoadAutoObjectFile | determine which object mode to use based on the file name's extension |
type ModuleDirectory = FilePath Source #
Load either a .o or dynamic library based on the file name's extension.
Load a function from an relocatable object file (.o or .so) If a modulesDir is specified, only load a path relative to the modulesDir (no ..)
loadFunctionFromDirectory :: ObjectLoadMode -> ModName -> FuncName -> FilePath -> FilePath -> IO (Either LoadSymbolError a) Source #
loadFunction :: ObjectLoadMode -> ModName -> FuncName -> FilePath -> IO (Either LoadSymbolError a) Source #