on master help sign in
Make ihWarn work properly with emptyFC on command line
f9e8ec2David Raymond Christiansen
src/Idris/Output.hs+3−1
@@ -23,7 +23,9 @@ ihWarn h fc err = do i <- getIState
23 case idris_outputmode i of
23 case idris_outputmode i of
24 RawOutput ->
24 RawOutput ->
25 do err' <- iRender . fmap (fancifyAnnots i) $
25 do err' <- iRender . fmap (fancifyAnnots i) $
26+ if fc_fname fc /= ""
26− text (show fc) <> colon <//> err
27+ then text (show fc) <> colon <//> err
28+ else err
27 runIO . hPutStrLn h $ displayDecorated (consoleDecorate i) err'
29 runIO . hPutStrLn h $ displayDecorated (consoleDecorate i) err'
28 IdeSlave n ->
30 IdeSlave n ->
29 do err' <- iRender . fmap (fancifyAnnots i) $ err
31 do err' <- iRender . fmap (fancifyAnnots i) $ err