Copyright | Justin Ethier |
---|---|
License | MIT (see LICENSE in the distribution) |
Maintainer | github.com/justinethier |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module contains data types used by the compiler.
Synopsis
- data CompOpts = CompileOptions {}
- 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 :: String
- 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.
CompileOptions | |
|
data CompLibOpts Source #
Options passed to the compiler library module
defaultCompileOptions :: String -> CompOpts Source #
The default compiler options
A very basic type to store a Haskell AST.
Utility functions
asts2Str :: [LispVal] -> String Source #
Convert a list of abstract syntax trees to a list of strings
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 :: String Source #
Runtime reference to module data structure
showValAST :: HaskAST -> String Source #
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