Safe Haskell | None |
---|
The Haskell→Javascript compiler.
- runCompile :: CompileState -> Compile a -> IO (Either CompileError (a, CompileState))
- compileViaStr :: (Show from, Show to, CompilesTo from to) => FilePath -> CompileConfig -> (from -> Compile to) -> String -> IO (Either CompileError (PrintState, CompileState))
- compileForDocs :: Module -> Compile [JsStmt]
- compileToAst :: (Show from, Show to, CompilesTo from to) => FilePath -> CompileState -> (from -> Compile to) -> String -> IO (Either CompileError (to, CompileState))
- compileModule :: Module -> Compile [JsStmt]
- compileExp :: Exp -> Compile JsExp
- compileDecl :: Bool -> Decl -> Compile [JsStmt]
- printCompile :: (Show from, Show to, CompilesTo from to) => CompileConfig -> (from -> Compile to) -> String -> IO ()
- printTestCompile :: String -> IO ()
- compileToplevelModule :: Module -> Compile [JsStmt]
Documentation
runCompile :: CompileState -> Compile a -> IO (Either CompileError (a, CompileState))Source
Run the compiler.
compileViaStr :: (Show from, Show to, CompilesTo from to) => FilePath -> CompileConfig -> (from -> Compile to) -> String -> IO (Either CompileError (PrintState, CompileState))Source
Compile a Haskell source string to a JavaScript source string.
compileForDocs :: Module -> Compile [JsStmt]Source
Compile the given Fay code for the documentation. This is specialised because the documentation isn't really “real” compilation.
compileToAst :: (Show from, Show to, CompilesTo from to) => FilePath -> CompileState -> (from -> Compile to) -> String -> IO (Either CompileError (to, CompileState))Source
Compile a Haskell source string to a JavaScript source string.
compileModule :: Module -> Compile [JsStmt]Source
Compile Haskell module.
compileExp :: Exp -> Compile JsExpSource
Compile Haskell expression.
printCompile :: (Show from, Show to, CompilesTo from to) => CompileConfig -> (from -> Compile to) -> String -> IO ()Source
Compile the given input and print the output out prettily.
printTestCompile :: String -> IO ()Source
Compile a String of Fay and print it as beautified JavaScript.
compileToplevelModule :: Module -> Compile [JsStmt]Source
Compile the top-level Fay module.