on master help sign in
Run usage analysis after every :r.
commit992e753b61463a8a7d03c8439850eafe57581901 authorMatus Tejiscak <ziman@functor.sk> dateMon 5 May 2014, 09:56 (12 years ago) parent67517aa
1 file changed+8−5
src/Idris/REPL.hs+8−5
src/Idris/REPL.hs+8−5
@@ -1255,7 +1255,13 @@ loadInputs h inputs
12551255 _ -> return ()
12561256 ist <- getIState
12571257 putIState (ist { idris_tyinfodata = tidata,
1258− idris_patdefs = patdefs }))
1258+ idris_patdefs = patdefs })
1259+
1260+ case opt getOutput opts of
1261+ [] -> performUsageAnalysis -- interactive
1262+ _ -> return [] -- batch, will be checked by the compiler
1263+
1264+ return ())
12591265 (\e -> do i <- getIState
12601266 case e of
12611267 At f e' -> do setErrSpan f
@@ -1399,10 +1405,7 @@ idrisMain opts =
13991405
14001406 ok <- noErrors
14011407 when ok $ case output of
1402− -- just do the checks
1403− [] -> performUsageAnalysis >> return ()
1404−
1405− -- the compiler will run usage analysis itself
1408+ [] -> return ()
14061409 (o:_) -> idrisCatch (process stdout "" (Compile cgn o))
14071410 (\e -> do ist <- getIState ; iputStrLn $ pshow ist e)
14081411