git.iko.soy/rowtype-yoga/purescript-native
on 2db1268 help sign in
70 lines 1.8 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 -- Disable inclusion of the built in Prelude
24 --
25 optionsNoPrelude :: Bool
26 -- |
27 -- Disable tail-call elimination
28 --
29 , optionsNoTco :: Bool
30 -- |
31 -- Perform type checks at runtime
32 --
33 , optionsPerformRuntimeTypeChecks :: Bool
34 -- |
35 -- Disable inlining of calls to return and bind for the Eff monad
36 --
37 , optionsNoMagicDo :: Bool
38 -- |
39 -- When specified, checks the type of `main` in the module, and generate a call to run main
40 -- after the module definitions.
41 --
42 , optionsMain :: Maybe String
43 -- |
44 -- Skip all optimizations
45 --
46 , optionsNoOptimizations :: Bool
47 -- |
48 -- Specify the namespace that PureScript modules will be exported to when running in the
49 -- browser.
50 --
51 , optionsBrowserNamespace :: String
52 -- |
53 -- The modules to keep while enabling dead code elimination
54 --
55 , optionsModules :: [String]
56 -- |
57 -- The modules to code gen
58 --
59 , optionsCodeGenModules :: [String]
60 -- |
61 -- Verbose error message
62 --
63 , optionsVerboseErrors :: Bool
64 } deriving Show
66-- |
67-- Default compiler options
68--
69defaultOptions :: Options
70defaultOptions = Options False False False False Nothing False "PS" [] [] False