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 @@ -239,16 +239,15 @@ main = do
239239 ([TextIRMode ], [] , [] ) -> fromStdinTextIR
240240 ([JSONIRMode ], [] , [] ) -> fromStdinJsonIR
241241
242- (o, [file], [] ) | optionsOK o ->
243- fromFile o file
244-
242+ (o, [file], [] ) | optionsOK o -> do
243+ input <- readFile file
244+ process o ( Just file) input
245245
246246 (_,_, errs) -> die $ concat errs ++ compilerUsage
247247 where
248248 compilerUsage = usageInfo header options
249249 where header = " Usage: <compiler> [OPTION...] file"
250250
251-
252251 -- Check options for consistency
253252 optionsOK :: [Flag ] -> Bool
254253 optionsOK o | length o >= 2 =
@@ -257,13 +256,6 @@ main = do
257256 optionsOK _ = True
258257
259258
260-
261- fromFile :: [Flag ] -> String -> IO ExitCode
262- fromFile flags fname = do
263- input <- readFile fname
264- process flags (Just fname) input
265-
266-
267259-- utility functions for printing things out
268260
269261hrWidth = 70
You can’t perform that action at this time.
0 commit comments