git.iko.soy/rowtype-yoga/purescript-native
on f34cf92 help sign in
54 lines 1.4 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 -- Inline calls to ret and bind for the Eff monad
28 --
29 , optionsMagicDo :: Bool
30 -- |
31 -- When specified, checks the type of `main` in the module, and generate a call to run main
32 -- after the module definitions.
33 --
34 , optionsMain :: Maybe String
35 -- |
36 -- Skip all optimizations
37 --
38 , optionsNoOptimizations :: Bool
39 -- |
40 -- Specify the namespace that PureScript modules will be exported to when running in the
41 -- browser.
42 --
43 , optionsBrowserNamespace :: String
44 -- |
45 -- The modules to keep while enabling dead code elimination
46 --
47 , optionsModules :: [String]
48 } deriving Show
50-- |
51-- Default compiler options
52--
53defaultOptions :: Options
54defaultOptions = Options False False Nothing False "PS" []