Safe Haskell | None |
---|---|
Language | Haskell2010 |
C code generation for Program
Utilities
viewNotExp :: Exp -> Maybe Exp Source
Return the argument of a boolean negation expression
Code generation user interface
compile :: (Interp instr CGen, HFunctor instr) => Program instr a -> String Source
Compile a program to C code represented as a string
For programs that make use of the primitives in Language.Embedded.Concurrent, the resulting C code can be compiled as follows:
gcc -Iinclude csrc/chan.c -lpthread YOURPROGRAM.c
icompile :: (Interp instr CGen, HFunctor instr) => Program instr a -> IO () Source
Compile a program to C code and print it on the screen
For programs that make use of the primitives in Language.Embedded.Concurrent, the resulting C code can be compiled as follows:
gcc -Iinclude csrc/chan.c -lpthread YOURPROGRAM.c