remove default from FromParser.fromParserPure and Main.step

This commit is contained in:
rhiannon morris 2024-04-07 03:20:39 +02:00
parent 7a0bc73d25
commit 11b0ab6a25
3 changed files with 11 additions and 13 deletions

View file

@ -34,9 +34,8 @@ Step : Type -> Type -> Type
Step a b = OpenFile -> a -> Eff Compile b
private
step : {default CErr console : ConsoleChannel} ->
Phase -> OutFile -> Step a b -> a -> Eff CompileStop b
step phase file act x = do
step : ConsoleChannel -> Phase -> OutFile -> Step a b -> a -> Eff CompileStop b
step console phase file act x = do
opts <- askAt OPTS
res <- withOutFile console file fromError $ \h => lift $ act h x
when (opts.until == Just phase) stopHere
@ -99,11 +98,11 @@ processFile : String -> Eff Compile ()
processFile file = withEarlyStop $ pipeline !(askAt OPTS) file where
pipeline : Options -> String -> Eff CompileStop ()
pipeline opts =
step Parse opts.dump.parse Main.parse >=>
step Check opts.dump.check Main.check >=>
step Erase opts.dump.erase Main.erase >=>
step Scheme opts.dump.scheme Main.scheme >=>
step End opts.outFile Main.output {console = COut}
step CErr Parse opts.dump.parse Main.parse >=>
step CErr Check opts.dump.check Main.check >=>
step CErr Erase opts.dump.erase Main.erase >=>
step CErr Scheme opts.dump.scheme Main.scheme >=>
step COut End opts.outFile Main.output
export covering