Print banner before typechecking

Otherwise it hides the errors
This commit is contained in:
Edwin Brady 2019-10-26 13:39:50 +01:00
parent f09138d508
commit ab98b4d3c9
3 changed files with 17 additions and 4 deletions

View File

@ -139,6 +139,8 @@ stMain opts
u <- newRef UST initUState
updateREPLOpts
session <- getSession
when (not $ nobanner session) $
iputStrLn banner
case fname of
Nothing => logTime "Loading prelude" $
when (not $ noprelude session) $
@ -166,8 +168,6 @@ stMain opts
setOutput (IDEMode 0 file file)
replIDE {c} {u} {m}
else do
when (not $ nobanner session) $
iputStrLn banner
repl {c} {u} {m}
showTimeRecord
else

View File

@ -38,6 +38,19 @@ preOptions [] = pure True
preOptions (NoBanner :: opts)
= do setSession (record { nobanner = True } !getSession)
preOptions opts
-- These things are processed later, but imply nobanner too
preOptions (OutputFile _ :: opts)
= do setSession (record { nobanner = True } !getSession)
preOptions opts
preOptions (ExecFn _ :: opts)
= do setSession (record { nobanner = True } !getSession)
preOptions opts
preOptions (IdeMode :: opts)
= do setSession (record { nobanner = True } !getSession)
preOptions opts
preOptions (CheckOnly :: opts)
= do setSession (record { nobanner = True } !getSession)
preOptions opts
preOptions (Quiet :: opts)
= do setOutput (REPL True)
preOptions opts

View File

@ -1,4 +1,4 @@
$1 Cycle1.idr
$1 Loop.idr
$1 --no-banner Cycle1.idr
$1 --no-banner Loop.idr
rm -rf build