Safe Haskell | None |
---|---|
Language | Haskell98 |
Yo dawg we heard you like Haste, so we let yo Haste programs compile yo Haste programs!
Currently, this API calls the hastec binary. In the future it should probably be the other way around.
- data OptLevel
- = None
- | Basic
- | WholeProgram
- data ProgStart
- data HasteTarget
- data CompileFlags
- cfOptimize :: CompileFlags -> OptLevel
- cfDebug :: CompileFlags -> Bool
- cfMinify :: CompileFlags -> Bool
- cfFullUnicode :: CompileFlags -> Bool
- cfOwnNamespace :: CompileFlags -> Bool
- cfStart :: CompileFlags -> ProgStart
- cfJSFiles :: CompileFlags -> [FilePath]
- cfTarget :: CompileFlags -> HasteTarget
- data CompileResult
- data HasteOutput
- data HasteInput
- compile :: CompileFlags -> FilePath -> HasteInput -> IO CompileResult
Documentation
data CompileFlags Source
Flags to pass to the compiler. Defaults are the same as when invoking hastec directly. Consult hastec --help for more detailed descriptions.
cfOptimize :: CompileFlags -> OptLevel Source
How much should the given program be optimized? Default: Basic
cfDebug :: CompileFlags -> Bool Source
Should the output be debuggable? Debug information will be stripped if the program is minified using Closure. Default: False
cfMinify :: CompileFlags -> Bool Source
Should the program be minified? This will strip any debug information from the resulting program. Default: False
cfFullUnicode :: CompileFlags -> Bool Source
Use full Unicode compatibility for Data.Char and friends? Default: False
cfOwnNamespace :: CompileFlags -> Bool Source
Put generated code in a separate namespace? Default: False
cfStart :: CompileFlags -> ProgStart Source
How should the program be started? Default: OnLoad
cfJSFiles :: CompileFlags -> [FilePath] Source
Javascript files to include in the final program. Default: []
cfTarget :: CompileFlags -> HasteTarget Source
Where to place the compilation output. Default: TargetString
compile :: CompileFlags -> FilePath -> HasteInput -> IO CompileResult Source
Compile a Haste program using the given compiler flags and source directory. Calling this function from the client will always result in failure.