Safe Haskell | None |
---|
The Haskell→Javascript compiler.
- runCompile :: CompileReader -> CompileState -> Compile a -> IO (Either CompileError (a, CompileState, CompileWriter))
- compileViaStr :: (Show from, Show to, CompilesTo from to) => FilePath -> CompileConfig -> (from -> Compile to) -> String -> IO (Either CompileError (PrintState, CompileState, CompileWriter))
- compileToAst :: (Show from, Show to, CompilesTo from to) => FilePath -> CompileReader -> CompileState -> (from -> Compile to) -> String -> IO (Either CompileError (to, CompileState, CompileWriter))
- compileModule :: Bool -> Module -> Compile [JsStmt]
- compileExp :: Exp -> Compile JsExp
- compileDecl :: Bool -> Decl -> Compile [JsStmt]
- compileToplevelModule :: Module -> Compile [JsStmt]
- parseFay :: Parseable ast => FilePath -> String -> ParseResult ast
Documentation
runCompile :: CompileReader -> CompileState -> Compile a -> IO (Either CompileError (a, CompileState, CompileWriter))Source
Run the compiler.
compileViaStr :: (Show from, Show to, CompilesTo from to) => FilePath -> CompileConfig -> (from -> Compile to) -> String -> IO (Either CompileError (PrintState, CompileState, CompileWriter))Source
Compile a Haskell source string to a JavaScript source string.
compileToAst :: (Show from, Show to, CompilesTo from to) => FilePath -> CompileReader -> CompileState -> (from -> Compile to) -> String -> IO (Either CompileError (to, CompileState, CompileWriter))Source
Compile a Haskell source string to a JavaScript source string.
compileExp :: Exp -> Compile JsExpSource
Compile Haskell expression.
compileToplevelModule :: Module -> Compile [JsStmt]Source
Compile the top-level Fay module.