@@ -34,6 +34,7 @@ import qualified Idris.IdeMode as IdeMode
34import Idris.Options
34import Idris.Options
35import Idris.Output
35import Idris.Output
36import Idris.Parser hiding (params)
36import Idris.Parser hiding (params)
37+import Idris.Parser.Helpers (parseErrorDoc)
37import Idris.TypeSearch (searchByType)
38import Idris.TypeSearch (searchByType)
39import Util.Pretty
40import Util.Pretty
@@ -43,7 +44,6 @@ import Control.Monad.State.Strict
43import System.Console.Haskeline
44import System.Console.Haskeline
44import System.Console.Haskeline.History
45import System.Console.Haskeline.History
45import System.IO (Handle, hPutStrLn, stdin, stdout)
46import System.IO (Handle, hPutStrLn, stdin, stdout)
46−import qualified Text.Trifecta.Result as P
48-- | Launch the proof shell
48-- | Launch the proof shell
49prover :: ElabInfo -> Bool -> Bool -> Name -> Idris ()
49prover :: ElabInfo -> Bool -> Bool -> Name -> Idris ()
@@ -319,7 +319,7 @@ elabloop info fn d prompt prf e prev h env
319 idrisCatch
319 idrisCatch
320 (case cmd of
320 (case cmd of
321 Left err ->
321 Left err ->
322− return (False, prev, e, False, prf, env, Left . Msg . show . fixColour (idris_colourRepl ist) $ err)
322+ return (False, prev, e, False, prf, env, Left . Msg . show . fixColour (idris_colourRepl ist) . parseErrorDoc $ err)
323 Right (Left cmd') ->
323 Right (Left cmd') ->
324 case cmd' of
324 case cmd' of
325 EQED -> do hs <- lifte e get_holes
325 EQED -> do hs <- lifte e get_holes
@@ -434,7 +434,7 @@ ploop fn d prompt prf e h
434 _ -> return ()
434 _ -> return ()
435 (d, st, done, prf', res) <- idrisCatch
435 (d, st, done, prf', res) <- idrisCatch
436 (case cmd of
436 (case cmd of
437− Left err -> return (False, e, False, prf, Left . Msg . show . fixColour (idris_colourRepl i) $ err)
437+ Left err -> return (False, e, False, prf, Left . Msg . show . fixColour (idris_colourRepl i) . parseErrorDoc $ err)
438 Right Undo -> do (_, st) <- elabStep e loadState
438 Right Undo -> do (_, st) <- elabStep e loadState
439 return (True, st, False, init prf, Right $ iPrintResult "")
439 return (True, st, False, init prf, Right $ iPrintResult "")
440 Right ProofState -> return (True, e, False, prf, Right $ iPrintResult "")
440 Right ProofState -> return (True, e, False, prf, Right $ iPrintResult "")