File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -238,16 +238,15 @@ main = do
238238 ([TextIRMode ], [] , [] ) -> fromStdinTextIR
239239 ([JSONIRMode ], [] , [] ) -> fromStdinJsonIR
240240
241- (o, [file], [] ) | optionsOK o ->
242- fromFile o file
243-
241+ (o, [file], [] ) | optionsOK o -> do
242+ input <- readFile file
243+ process o ( Just file) input
244244
245245 (_,_, errs) -> die $ concat errs ++ compilerUsage
246246 where
247247 compilerUsage = usageInfo header options
248248 where header = " Usage: <compiler> [OPTION...] file"
249249
250-
251250 -- Check options for consistency
252251 optionsOK :: [Flag ] -> Bool
253252 optionsOK o | length o >= 2 =
@@ -256,13 +255,6 @@ main = do
256255 optionsOK _ = True
257256
258257
259-
260- fromFile :: [Flag ] -> String -> IO ExitCode
261- fromFile flags fname = do
262- input <- readFile fname
263- process flags (Just fname) input
264-
265-
266258-- utility functions for printing things out
267259
268260hrWidth = 70
You can’t perform that action at this time.
0 commit comments