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))
- compileExp :: Exp -> Compile JsExp
- compileDecl :: Bool -> Decl -> Compile [JsStmt]
- compileToplevelModule :: FilePath -> Module -> Compile [JsStmt]
- compileModuleFromFile :: FilePath -> Compile [JsStmt]
- compileModuleFromContents :: String -> Compile [JsStmt]
- compileModuleFromName :: ModuleName -> Compile [JsStmt]
- compileModule :: FilePath -> String -> Compile [JsStmt]
- compileModuleFromAST :: 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 :: FilePath -> Module -> Compile [JsStmt]Source
Compile the top-level Fay module.
compileModuleFromFile :: FilePath -> Compile [JsStmt]Source
Read a file and compile.
compileModuleFromContents :: String -> Compile [JsStmt]Source
Compile a source string.
compileModuleFromName :: ModuleName -> Compile [JsStmt]Source
Lookup a module from include directories and compile.
compileModule :: FilePath -> String -> Compile [JsStmt]Source
Compile given the location and source string.
compileModuleFromAST :: Module -> Compile [JsStmt]Source
Compile a parse HSE module.