on master help sign in
Follow IDESlave protocol when import not found
commitda45e7d0a2c54c8a63c7970cb18a619a37072bc5 authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateFri 2 May 2014, 20:25 (12 years ago) parenta3fa5a4
2 files changed+4−5
src/Idris/Parser.hs+2−3 src/Idris/REPL.hs+2−2
src/Idris/Parser.hs+2−3
@@ -1158,8 +1158,7 @@ loadModule outh f
11581158 = idrisCatch (loadModule' outh f)
11591159 (\e -> do setErrSpan (getErrSpan e)
11601160 ist <- getIState
1161− msg <- showErr e
1162− ihputStrLn outh msg
1161+ ihWarn outh (getErrSpan e) $ pprintErr ist e
11631162 return "")
11641163
11651164{- | Load idris module -}
@@ -1206,7 +1205,7 @@ loadSource' h lidr r
12061205 = idrisCatch (loadSource h lidr r)
12071206 (\e -> do setErrSpan (getErrSpan e)
12081207 ist <- getIState
1209− ihRenderError h (pprintErr ist e))
1208+ ihWarn h (getErrSpan e) (pprintErr ist e))
12101209
12111210{- | Load Idris source code-}
12121211loadSource :: Handle -> Bool -> FilePath -> Idris ()
src/Idris/REPL.hs+2−2
@@ -1260,10 +1260,10 @@ loadInputs h inputs
12601260 (\e -> do i <- getIState
12611261 case e of
12621262 At f _ -> do setErrSpan f
1263− ihRenderError stdout $ pprintErr i e
1263+ ihWarn stdout f $ pprintErr i e
12641264 ProgramLineComment -> return () -- fail elsewhere
12651265 _ -> do setErrSpan emptyFC -- FIXME! Propagate it
1266− iputStrLn (pshow i e))
1266+ ihWarn stdout emptyFC $ pprintErr i e)
12671267 where -- load all files, stop if any fail
12681268 tryLoad :: Bool -> [IFileType] -> Idris ()
12691269 tryLoad keepstate [] = return ()