SMOP
view release on metacpan or search on metacpan
m0ld/m0ld.cabal view on Meta::CPAN
-- library
-- build-Depends: base,utf8-string >= 0.3.1.1,containers >= 0.1.0.1,parsec >= 2.0.0.0
--
-- exposed-modules: M0ld,M0ld.Parser,M0ld.AST -}
executable m0ld
build-Depends: base,utf8-string >= 0.3.1.1,containers >= 0.1.0.1,parsec >= 2.0.0.0
main-is: m0ld.hs
if flag(SMOP)
extra-libraries: smop pcl perl
extra-lib-dirs: ../build
cpp-options: -DEMBED_SMOP=1
m0ld/m0ld.hs view on Meta::CPAN
import System.IO.UTF8
import Debug.Trace
import System.Console.GetOpt
import System.Environment
import M0ld.M0ld (prettyPrintBytecode)
import M0ld.Yeast (compileToYeast)
import M0ld.JS (compileToJS)
import M0ld.C (dumpToC)
import M0ld.AST
import M0ld.Parser
#ifdef EMBED_SMOP
import M0ld.Eval
#endif
#ifdef EMBED_SMOP
eval code = evalM0ld code
#else
eval code = putStrLn "--exec use ./Setup configure --user --flags=SMOP"
#endif
spec = [("print-bytecode","print resulting mold bytecode in a human readable form"),
("exec","execute the m0le"),
("js","compile down to js"),
("yeast-funcs","compile down to a yeast frame (the functions for the frame)"),
("yeast-create","compile down to a yeast frame (the expression to create the frame)")]
main = do
( run in 1.946 second using v1.01-cache-2.11-cpan-0b58ddf2af1 )