| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Gibbon.Compiler
Description
The compiler pipeline, assembled from several passes.
Synopsis
- compile :: Config -> FilePath -> IO ()
- compileCmd :: [String] -> IO ()
- data Config = Config {}
- data Mode
- data Input
- = Haskell
- | SExpr
- | Unspecified
- configParser :: Parser Config
- configWithArgs :: Parser (Config, [FilePath])
- defaultConfig :: Config
- compileAndRunExe :: Config -> FilePath -> IO String
Compiler entrypoints
compile :: Config -> FilePath -> IO () Source #
Compiler entrypoint, given a full configuration and a list of files to process, do the thing.
compileCmd :: [String] -> IO () Source #
Command line version of the compiler entrypoint. Parses command line arguments given as string inputs. This also allows us to run conveniently from within GHCI. For example:
compileCmd $ words $ " -r -p -v5 examples/test11c_funrec.gib "
Configuration options and parsing
Overall configuration of the compiler, as determined by command line arguments and possible environment variables.
Constructors
| Config | |
Fields
| |
Instances
| Read Config Source # | |
| Show Config Source # | |
| Eq Config Source # | |
| Ord Config Source # | |
| MonadReader Config PassM Source # | |
How far to run the compiler/interpreter.
Constructors
| ToParse | Parse and then stop |
| ToC | Compile to C |
| ToExe | Compile to C then build a binary. |
| RunExe | Compile to executable then run. |
| Interp2 | Interp late in the compiler pipeline. |
| Interp1 | Interp early. |
| ToMPL | Compile to SML (mlton dialect) |
| ToMPLExe | Compile to SML & compile with MPL |
| RunMPL | Compile to SML & compile with MPL & run |
| Bench Var | Benchmark a particular function applied to the packed data within an input file. |
| BenchInput FilePath | Hardcode the input file to the benchmark in the C code. |
What input format to expect on disk.
Constructors
| Haskell | |
| SExpr | |
| Unspecified |
Instances
| Bounded Input Source # | |
| Enum Input Source # | |
Defined in Gibbon.Common Methods succ :: Input -> Input Source # pred :: Input -> Input Source # toEnum :: Int -> Input Source # fromEnum :: Input -> Int Source # enumFrom :: Input -> [Input] Source # enumFromThen :: Input -> Input -> [Input] Source # enumFromTo :: Input -> Input -> [Input] Source # enumFromThenTo :: Input -> Input -> Input -> [Input] Source # | |
| Read Input Source # | |
| Show Input Source # | |
| Eq Input Source # | |
| Ord Input Source # | |
Defined in Gibbon.Common | |
configWithArgs :: Parser (Config, [FilePath]) Source #
Parse configuration as well as file arguments.