git.iko.soy/rowtype-yoga/purescript-native
on f04ca54 help sign in
58 lines 1.5 kB history raw
1-----------------------------------------------------------------------------
2--
3-- Module : Language.PureScript.Options
4-- Copyright : (c) Phil Freeman 2013
5-- License : MIT
6--
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
9-- Portability :
10--
11-- |
12-- The data type of compiler options
13--
14-----------------------------------------------------------------------------
16module Language.PureScript.Options where
18-- |
19-- The data type of compiler options
20--
21data Options = Options {
22 -- |
23 -- Perform tail-call elimination
24 --
25 optionsTco :: Bool
26 -- |
27 -- Perform type checks at runtime
28 --
29 , optionsPerformRuntimeTypeChecks :: Bool
30 -- |
31 -- Inline calls to ret and bind for the Eff monad
32 --
33 , optionsMagicDo :: Bool
34 -- |
35 -- When specified, checks the type of `main` in the module, and generate a call to run main
36 -- after the module definitions.
37 --
38 , optionsMain :: Maybe String
39 -- |
40 -- Skip all optimizations
41 --
42 , optionsNoOptimizations :: Bool
43 -- |
44 -- Specify the namespace that PureScript modules will be exported to when running in the
45 -- browser.
46 --
47 , optionsBrowserNamespace :: String
48 -- |
49 -- The modules to keep while enabling dead code elimination
50 --
51 , optionsModules :: [String]
52 } deriving Show
54-- |
55-- Default compiler options
56--
57defaultOptions :: Options
58defaultOptions = Options False False False Nothing False "PS" []