haste-compiler-0.5.0.1: Haskell To ECMAScript compiler

Safe HaskellNone
LanguageHaskell98

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.

defaultFlags :: CompileFlags Source

Default compiler flags.

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 -> MinifyFlag 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

cfUseStrict :: CompileFlags -> Bool Source

'use strict';? Default: True

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.