Portability | portable |
---|---|
Stability | experimental |
Maintainer | github.com/justinethier |
Safe Haskell | None |
This module contains data types used by the compiler.
- data CompOpts = CompileOptions String Bool Bool (Maybe String)
- data CompLibOpts = CompileLibraryOptions {}
- defaultCompileOptions :: String -> CompOpts
- data HaskAST
- ast2Str :: LispVal -> String
- asts2Str :: [LispVal] -> String
- createAstFunc :: CompOpts -> [HaskAST] -> HaskAST
- createAstCont :: CompOpts -> String -> String -> HaskAST
- joinL :: forall a. [[a]] -> [a] -> [a]
- moduleRuntimeVar :: [Char]
- showValAST :: HaskAST -> String
- header :: String -> Bool -> String -> [String]
- headerComment :: [String]
- headerModule :: [String]
- headerImports :: [String]
Data types
A type to store options passed to compile. Eventually all of this might be able to be integrated into a Compile monad.
data CompLibOpts Source
Options passed to the compiler library module
defaultCompileOptions :: String -> CompOptsSource
The default compiler options
A very basic type to store a Haskell AST.
Utility functions
Create code for a function
:: CompOpts | Compilation options |
-> String | Value to send to the continuation |
-> String | Extra leading indentation (or blank string if none) |
-> HaskAST | Generated code |
Create code for a continutation
:: forall a . | |
=> [[a]] | Original list-of-lists |
-> [a] | Separator |
-> [a] | Joined list |
A utility function to join list members together
moduleRuntimeVar :: [Char]Source
Runtime reference to module data structure
showValAST :: HaskAST -> StringSource
Generate code based on the given Haskell AST
Headers appended to output file
header :: String -> Bool -> String -> [String]Source
Block of code used in the header of a Haskell program generated by the compiler.
headerComment :: [String]Source
Header comment used at the top of a Haskell program generated by the compiler
headerModule :: [String]Source
Main module used in a compiled Haskell program
headerImports :: [String]Source
Imports used for a compiled program