@@ -1255,7 +1255,13 @@ loadInputs h inputs
1255 _ -> return ()
1255 _ -> return ()
1256 ist <- getIState
1256 ist <- getIState
1257 putIState (ist { idris_tyinfodata = tidata,
1257 putIState (ist { idris_tyinfodata = tidata,
1258− idris_patdefs = patdefs }))
1258+ idris_patdefs = patdefs })
1260+ case opt getOutput opts of
1261+ [] -> performUsageAnalysis -- interactive
1262+ _ -> return [] -- batch, will be checked by the compiler
1259 (\e -> do i <- getIState
1265 (\e -> do i <- getIState
1260 case e of
1266 case e of
1261 At f e' -> do setErrSpan f
1267 At f e' -> do setErrSpan f
@@ -1399,10 +1405,7 @@ idrisMain opts =
1400 ok <- noErrors
1406 ok <- noErrors
1401 when ok $ case output of
1407 when ok $ case output of
1402− -- just do the checks
1408+ [] -> return ()
1403− [] -> performUsageAnalysis >> return ()
1405− -- the compiler will run usage analysis itself
1406 (o:_) -> idrisCatch (process stdout "" (Compile cgn o))
1409 (o:_) -> idrisCatch (process stdout "" (Compile cgn o))
1407 (\e -> do ist <- getIState ; iputStrLn $ pshow ist e)
1410 (\e -> do ist <- getIState ; iputStrLn $ pshow ist e)