Safe Haskell | None |
---|---|
Language | Haskell98 |
- cmdLoadFromFile :: Config -> Store -> Maybe String -> [FilePath] -> FilePath -> ExceptT String IO ()
- cmdLoadSourceTetraFromFile :: Config -> Store -> Bundle Int Name Error -> FilePath -> ExceptT String IO ()
- cmdLoadSourceTetraFromString :: Config -> Store -> Bundle Int Name Error -> Source -> String -> ExceptT String IO ()
- cmdLoadCoreFromFile :: Config -> Language -> FilePath -> ExceptT String IO ()
- cmdLoadCoreFromString :: Config -> Language -> Source -> String -> ExceptT String IO ()
- cmdLoadSimplifier :: Config -> Language -> String -> [FilePath] -> ExceptT String IO Language
- cmdLoadSimplifierIntoBundle :: (Ord n, Show n, NFData n, Pretty n, Pretty (err (AnTEC SourcePos n))) => Config -> Bundle s n err -> String -> [FilePath] -> ExceptT String IO (Bundle s n err)
Documentation
:: Config | Driver config. |
-> Store | Interface store. |
-> Maybe String | Simplifier specification. |
-> [FilePath] | More modules to use as inliner templates. |
-> FilePath | Module file name. |
-> ExceptT String IO () |
Load and transform source code, interface, or build file.
The result is printed to stdout
.
Any errors are thrown in the ExceptT
monad.
This function handle fragments of Disciple Core, as well as Source Tetra modules. The language to use is determined by inspecting the file name extension.
We also take the specification of a simplifier to apply to the module.
For Source Tetra modules, dependent modules will be compiled, or their interfaces loaded as needed.
cmdLoadSourceTetraFromFile Source
:: Config | Driver config. |
-> Store | Interface store. |
-> Bundle Int Name Error | Tetra language bundle. |
-> FilePath | Module file path. |
-> ExceptT String IO () |
Load a Disciple Source Tetra module from a file.
The result is printed to stdout
.
Any errors are thrown in the ExceptT
monad.
cmdLoadSourceTetraFromString Source
:: Config | Driver config. |
-> Store | Interface store. |
-> Bundle Int Name Error | Tetra language bundle. |
-> Source | Source of the code. |
-> String | Program module text. |
-> ExceptT String IO () |
Load a Disciple Source Tetra module from a string.
The result is printed to stdout
.
Any errors are thrown in the ExceptT
monad.
:: Config | Driver config. |
-> Language | Core language definition. |
-> FilePath | Module file path |
-> ExceptT String IO () |
Load a Disciple Core module from a file.
The result is printed to stdout
.
:: Config | Driver config. |
-> Language | Language definition |
-> Source | Source of the code. |
-> String | Program module text. |
-> ExceptT String IO () |
Load a Disciple Core module from a string.
The result it printed to stdout
.
:: Config | Driver config. |
-> Language | Language definition. |
-> String | Simplifier specification. |
-> [FilePath] | Modules to use as inliner templates. |
-> ExceptT String IO Language |
Parse the simplifier defined in this string, and load it and all the inliner templates into the language bundle.
cmdLoadSimplifierIntoBundle Source
:: (Ord n, Show n, NFData n, Pretty n, Pretty (err (AnTEC SourcePos n))) | |
=> Config | Driver config. |
-> Bundle s n err | Language bundle |
-> String | Simplifier specification. |
-> [FilePath] | Modules to use as inliner templates. |
-> ExceptT String IO (Bundle s n err) |
Parse the simplifier defined in this string, and load it and all the inliner templates into the bundle