on master help sign in
Follow IDESlave protocol when import not found
da45e7dDavid Raymond Christiansen
src/Idris/Parser.hs+2−3
@@ -1158,8 +1158,7 @@ loadModule outh f
1158 = idrisCatch (loadModule' outh f)
1158 = idrisCatch (loadModule' outh f)
1159 (\e -> do setErrSpan (getErrSpan e)
1159 (\e -> do setErrSpan (getErrSpan e)
1160 ist <- getIState
1160 ist <- getIState
1161− msg <- showErr e
1161+ ihWarn outh (getErrSpan e) $ pprintErr ist e
1162− ihputStrLn outh msg
1163 return "")
1162 return "")
1164
1163
1165{- | Load idris module -}
1164{- | Load idris module -}
@@ -1206,7 +1205,7 @@ loadSource' h lidr r
1206 = idrisCatch (loadSource h lidr r)
1205 = idrisCatch (loadSource h lidr r)
1207 (\e -> do setErrSpan (getErrSpan e)
1206 (\e -> do setErrSpan (getErrSpan e)
1208 ist <- getIState
1207 ist <- getIState
1209− ihRenderError h (pprintErr ist e))
1208+ ihWarn h (getErrSpan e) (pprintErr ist e))
1210
1209
1211{- | Load Idris source code-}
1210{- | Load Idris source code-}
1212loadSource :: Handle -> Bool -> FilePath -> Idris ()
1211loadSource :: Handle -> Bool -> FilePath -> Idris ()
src/Idris/REPL.hs+2−2
@@ -1260,10 +1260,10 @@ loadInputs h inputs
1260 (\e -> do i <- getIState
1260 (\e -> do i <- getIState
1261 case e of
1261 case e of
1262 At f _ -> do setErrSpan f
1262 At f _ -> do setErrSpan f
1263− ihRenderError stdout $ pprintErr i e
1263+ ihWarn stdout f $ pprintErr i e
1264 ProgramLineComment -> return () -- fail elsewhere
1264 ProgramLineComment -> return () -- fail elsewhere
1265 _ -> do setErrSpan emptyFC -- FIXME! Propagate it
1265 _ -> do setErrSpan emptyFC -- FIXME! Propagate it
1266− iputStrLn (pshow i e))
1266+ ihWarn stdout emptyFC $ pprintErr i e)
1267 where -- load all files, stop if any fail
1267 where -- load all files, stop if any fail
1268 tryLoad :: Bool -> [IFileType] -> Idris ()
1268 tryLoad :: Bool -> [IFileType] -> Idris ()
1269 tryLoad keepstate [] = return ()
1269 tryLoad keepstate [] = return ()