Safe Haskell | None |
---|---|
Language | Haskell2010 |
The Haskell→Javascript compiler.
Synopsis
- runCompileModule :: CompileReader -> CompileState -> Compile a -> CompileModule a
- compileViaStr :: FilePath -> Config -> (Module -> Compile [JsStmt]) -> String -> IO (Either CompileError (Printer, CompileState, CompileWriter))
- compileWith :: (Monoid a, Semigroup a) => FilePath -> (a -> Module -> Compile a) -> (FilePath -> String -> Compile a) -> (X -> Module -> IO (Either CompileError Module)) -> 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 a Source #
Runs compilation for a single module.
compileViaStr :: FilePath -> Config -> (Module -> Compile [JsStmt]) -> String -> IO (Either CompileError (Printer, CompileState, CompileWriter)) Source #
Compile a Haskell source string to a JavaScript source string.
compileWith :: (Monoid a, Semigroup a) => FilePath -> (a -> Module -> Compile a) -> (FilePath -> String -> Compile a) -> (X -> Module -> IO (Either CompileError Module)) -> String -> Compile (a, CompileState, CompileWriter) Source #
Compile a module
compileExp :: Exp -> Compile JsExp Source #
Compile Haskell expression.
compileToplevelModule :: FilePath -> Module -> Compile [JsStmt] Source #
Compile the top-level Fay module.
compileModuleFromContents :: String -> Compile ([JsStmt], [JsStmt]) Source #
Compile a source string.