Safe Haskell | None |
---|
The Haskell→Javascript compiler.
- runCompileModule :: CompileReader -> CompileState -> Compile a -> CompileModule a
- compileViaStr :: FilePath -> CompileConfig -> PrintState -> (Module -> Compile [JsStmt]) -> String -> IO (Either CompileError (PrintState, CompileState, CompileWriter))
- compileWith :: Monoid a => FilePath -> (a -> Module -> Compile a) -> (FilePath -> String -> Compile a) -> String -> Compile (a, CompileState, CompileWriter)
- compileExp :: Exp -> Compile JsExp
- compileDecl :: Bool -> Decl -> Compile [JsStmt]
- compileToplevelModule :: FilePath -> Module -> Compile [JsStmt]
- compileModuleFromContents :: String -> Compile ([JsStmt], [JsStmt])
- compileModuleFromAST :: ([JsStmt], [JsStmt]) -> Module -> Compile ([JsStmt], [JsStmt])
- parseFay :: Parseable ast => FilePath -> String -> ParseResult ast
Documentation
runCompileModule :: CompileReader -> CompileState -> Compile a -> CompileModule aSource
Runs compilation for a single module.
compileViaStr :: FilePath -> CompileConfig -> PrintState -> (Module -> Compile [JsStmt]) -> String -> IO (Either CompileError (PrintState, CompileState, CompileWriter))Source
Compile a Haskell source string to a JavaScript source string.
compileWith :: Monoid a => FilePath -> (a -> Module -> Compile a) -> (FilePath -> String -> Compile a) -> String -> Compile (a, CompileState, CompileWriter)Source
Compile a module
compileExp :: Exp -> Compile JsExpSource
Compile Haskell expression.
compileToplevelModule :: FilePath -> Module -> Compile [JsStmt]Source
Compile the top-level Fay module.