on master help sign in
update Main now that UTF-8 is handled by Terminal.Args and imports are reduced
92ee73bEvan Czaplicki
terminal/src/Main.hs+11−15
@@ -6,15 +6,12 @@ module Main
6
6
7
7
8import Prelude hiding (init)
8import Prelude hiding (init)
9−import GHC.IO.Encoding (setLocaleEncoding, utf8)
10import qualified Data.List as List
9import qualified Data.List as List
11import qualified Text.PrettyPrint.ANSI.Leijen as P
10import qualified Text.PrettyPrint.ANSI.Leijen as P
12import Text.PrettyPrint.ANSI.Leijen ((<>))
11import Text.PrettyPrint.ANSI.Leijen ((<>))
13import Text.Read (readMaybe)
12import Text.Read (readMaybe)
14
13
15−import qualified Elm.Diff as Diff
16import qualified Elm.Version as V
14import qualified Elm.Version as V
17−import qualified Generate.Output as Output
18import Terminal.Args
15import Terminal.Args
19import Terminal.Args.Helpers
16import Terminal.Args.Helpers
20
17
@@ -34,17 +31,16 @@ import qualified Repl
34
31
35main :: IO ()
32main :: IO ()
36main =
33main =
37− do setLocaleEncoding utf8
38− complex intro outro
34+ complex intro outro
39− [ repl
35+ [ repl
40− , init
36+ , init
41− , reactor
37+ , reactor
42− , make
38+ , make
43− , install
39+ , install
44− , bump
40+ , bump
45− , diff
41+ , diff
46− , publish
42+ , publish
47− ]
43+ ]
48
44
49
45
50intro :: P.Doc
46intro :: P.Doc
@@ -196,7 +192,7 @@ make =
196 flags Make.Flags
192 flags Make.Flags
197 |-- onOff "debug" "Turn on the time-travelling debugger. It allows you to rewind and replay events. The events can be imported/exported into a file, which makes for very precise bug reports!"
193 |-- onOff "debug" "Turn on the time-travelling debugger. It allows you to rewind and replay events. The events can be imported/exported into a file, which makes for very precise bug reports!"
198 |-- onOff "optimize" "Turn on optimizations to make code smaller and faster. For example, the compiler renames record fields to be as short as possible and unboxes values to reduce allocation."
194 |-- onOff "optimize" "Turn on optimizations to make code smaller and faster. For example, the compiler renames record fields to be as short as possible and unboxes values to reduce allocation."
199− |-- flag "output" Output.output "Specify the name of the resulting JS file. For example --output=assets/elm.js to generate the JS at assets/elm.js or --output=/dev/null to generate no output at all!"
195+ |-- flag "output" Make.output "Specify the name of the resulting JS file. For example --output=assets/elm.js to generate the JS at assets/elm.js or --output=/dev/null to generate no output at all!"
200 |-- flag "report" Make.reportType "You can say --report=json to get error messages as JSON. This is only really useful if you are an editor plugin. Humans should avoid it!"
196 |-- flag "report" Make.reportType "You can say --report=json to get error messages as JSON. This is only really useful if you are an editor plugin. Humans should avoid it!"
201 |-- flag "docs" Make.docsFile "Generate a JSON file of documentation for a package. Eventually it will be possible to preview docs with `reactor` because it is quite hard to deal with these JSON files directly."
197 |-- flag "docs" Make.docsFile "Generate a JSON file of documentation for a package. Eventually it will be possible to preview docs with `reactor` because it is quite hard to deal with these JSON files directly."
202 in
198 in