Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ScriptSession = ScriptSession {}
- newtype ScriptSessionError = ScriptSessionLoadError GhcException
- 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
- type ModName = String
- type FuncName = String
- data LoadSymbolError = LoadSymbolError
- loadFunction :: ModName -> FuncName -> FilePath -> IO (Either LoadSymbolError a)
- prefixUnderscore :: String
Documentation
data ScriptSession Source #
newtype ScriptSessionError Source #
Instances
Show ScriptSessionError Source # | |
Defined in ProjectM36.ScriptSession showsPrec :: Int -> ScriptSessionError -> ShowS # show :: ScriptSessionError -> String # showList :: [ScriptSessionError] -> ShowS # |
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 #
loadFunction :: ModName -> FuncName -> FilePath -> IO (Either LoadSymbolError a) Source #