Safe Haskell | None |
---|
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 -> OptLevelSource
How much should the given program be optimized? Default: Basic
cfDebug :: CompileFlags -> BoolSource
Should the output be debuggable? Debug information will be stripped if the program is minified using Closure. Default: False
cfMinify :: CompileFlags -> BoolSource
Should the program be minified? This will strip any debug information from the resulting program. Default: False
cfFullUnicode :: CompileFlags -> BoolSource
Use full Unicode compatibility for Data.Char and friends? Default: False
cfOwnNamespace :: CompileFlags -> BoolSource
Put generated code in a separate namespace? Default: False
cfStart :: CompileFlags -> ProgStartSource
How should the program be started? Default: OnLoad
cfJSFiles :: CompileFlags -> [FilePath]Source
Javascript files to include in the final program. Default: []
cfTarget :: CompileFlags -> HasteTargetSource
Where to place the compilation output. Default: TargetString
compile :: CompileFlags -> FilePath -> HasteInput -> IO CompileResultSource
Compile a Haste program using the given compiler flags and source directory. Calling this function from the client will always result in failure.