on master help sign in
Have --ideslave print errors properly

Before, it was using the Show instance, whereas now it calls the pretty-printer for errors. Fixes #549.

commitdfb4c004863a0126fe20fb4a1b292c146465d6b0 authorDavid Christiansen <david@davidchristiansen.dk> dateMon 21 Oct 2013, 11:25 (13 years ago) parent8fc6d12
1 file changed+4−4
src/Idris/REPL.hs+4−4
src/Idris/REPL.hs+4−4
@@ -125,12 +125,12 @@ ideslave orig mods
125125 Failure err -> iPrintError $ show (fixColour c err)
126126 Success (Prove n') -> do iPrintResult ""
127127 idrisCatch
128− (do process fn (Prove n'))
129− (\e -> do iPrintError $ show e)
128+ (process fn (Prove n'))
129+ (\e -> getIState >>= iPrintError . flip pshow e)
130130 isetPrompt (mkPrompt mods)
131131 Success cmd -> idrisCatch
132− (do ideslaveProcess fn cmd)
133− (\e -> do iPrintError $ show e)
132+ (ideslaveProcess fn cmd)
133+ (\e -> getIState >>= iPrintError . flip pshow e)
134134 Just (REPLCompletions str) ->
135135 do (unused, compls) <- replCompletion (reverse str, "")
136136 let good = SexpList [SymbolAtom "ok", toSExp (map replacement compls, reverse unused)]