epic-0.9.3: Compiler for a simple functional language

Portability | portable
Stability | experimental
Maintainer | eb@dcs.st-and.ac.uk
Safe Haskell | None

Epic.Compiler

Description

Public interface for Epigram Supercombinator Compiler

Synopsis

- data CompileOptions
  - = KeepC
  - | Trace
  - | ShowBytecode
  - | ShowParseTree
  - | MakeHeader FilePath
  - | GCCOpt String
  - | Debug
  - | Checking Int
  - | ExternalMain
  - | MainInc FilePath
  - | LinkObj FilePath
- compile :: FilePath -> FilePath -> Maybe FilePath -> IO ()
- compileOpts :: FilePath -> FilePath -> Maybe FilePath -> [CompileOptions] -> IO ()
- compileDecls :: FilePath -> Maybe FilePath -> [Decl] -> [CompileOptions] -> IO ()
- link :: [FilePath] -> FilePath -> [CompileOptions] -> IO ()

# Documentation

data CompileOptions

(Debugging) options to give to compiler

Constructors

KeepC | Keep intermediate C file
Trace | Generate trace at run-time (debug)
ShowBytecode | Show generated code
ShowParseTree | Show parse tree
MakeHeader FilePath | Output a .h file too
GCCOpt String | Extra GCC option
Debug | Generate debug info
Checking Int | Checking level (0 none)
ExternalMain | main is defined externally (in C)
MainInc FilePath | File to #include in main program
LinkObj FilePath | .o file to link with

Instances

Eq CompileOptions |

compile

Arguments

:: FilePath | Input file name
-> FilePath | Output file name
-> Maybe FilePath | Interface (.ei) file name, if desired
-> IO () |

Compile a source file in supercombinator language to a .o

compileOpts

Arguments

:: FilePath | Input file name
-> FilePath | Output file name
-> Maybe FilePath | Interface (.ei) file name, if desired
-> [CompileOptions] |
-> IO () |

compileDecls

Arguments

:: FilePath | Output file name
-> Maybe FilePath | Interface (.ei) file name, if desired
-> [Decl] | Declarations
-> [CompileOptions] |
-> IO () |

link

Arguments

:: [FilePath] | Object files
-> FilePath | Executable filename
-> [CompileOptions] |
-> IO () |

Link a collection of .o files into an executable