on master help sign in
Remove print_program option
006e086Justin Leitgeb
compiler/Compiler.hs+1−8
@@ -37,7 +37,6 @@ data Flags =
37 , runtime :: Maybe FilePath
37 , runtime :: Maybe FilePath
38 , only_js :: Bool
38 , only_js :: Bool
39 , print_types :: Bool
39 , print_types :: Bool
40− , print_program :: Bool
41 , scripts :: [FilePath]
40 , scripts :: [FilePath]
42 , no_prelude :: Bool
41 , no_prelude :: Bool
43 , cache_dir :: FilePath
42 , cache_dir :: FilePath
@@ -66,8 +65,6 @@ flags = Flags
66 &= help "Additional source directories besides project root. Searched when using --make"
65 &= help "Additional source directories besides project root. Searched when using --make"
67 , print_types = False
66 , print_types = False
68 &= help "Print out infered types of top-level definitions."
67 &= help "Print out infered types of top-level definitions."
69− , print_program = False
70− &= help "Print out an internal representation of a program."
71 } &= help "Compile Elm programs to HTML, CSS, and JavaScript."
68 } &= help "Compile Elm programs to HTML, CSS, and JavaScript."
72 &= helpArg [explicit, name "help", name "h"]
69 &= helpArg [explicit, name "help", name "h"]
73 &= versionArg [explicit, name "version", name "v", summary (showVersion version)]
70 &= versionArg [explicit, name "version", name "v", summary (showVersion version)]
@@ -148,11 +145,7 @@ buildFile flags moduleNum numModules interfaces filePath =
148 Left errors -> do
145 Left errors -> do
149 mapM print (List.intersperse (P.text " ") errors)
146 mapM print (List.intersperse (P.text " ") errors)
150 exitFailure
147 exitFailure
151− Right modul -> do
152− case print_program flags of
153− False -> return ()
154− True -> print . pretty $ program modul
155− return modul
148+ Right modul -> return modul
156
149
157 when (print_types flags)
150 when (print_types flags)
158 (printTypes interfaces
151 (printTypes interfaces