haste-compiler-0.4: Haskell To ECMAScript compiler

Safe HaskellNone

Haste.Compiler

Description

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.

Synopsis

Documentation

data OptLevel Source

Constructors

None 
Basic 
WholeProgram 

data ProgStart Source

Constructors

ASAP 
OnLoad 
Custom String 

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.