on master help sign in
Merge pull request #1255 from david-christiansen/error-reflection

Fix IDESlave reporting of ProofSearchFail

commit258244d76914bde517ea716f7d624578b200d6ed authorDavid Christiansen <david@davidchristiansen.dk> dateSun 25 May 2014, 14:47 (12 years ago) parent636e6e1723d972
1 file changed+4−2
src/Idris/Error.hs+4−2
src/Idris/Error.hs+4−2
@@ -43,11 +43,13 @@ idrisCatch = catchError
4343setAndReport :: Err -> Idris ()
4444setAndReport e = do ist <- getIState
4545 let h = idris_outh ist
46− case e of
46+ case (e) of
4747 At fc e -> do setErrSpan fc
4848 ihWarn h fc $ pprintErr ist e
4949 _ -> do setErrSpan (getErrSpan e)
50− ihputStrLn h $ pshow ist e
50+ ihWarn h emptyFC $ pprintErr ist e
51+ where unwrap (ProofSearchFail e) = e -- remove bookkeeping constructor
52+ unwrap e = e
5153
5254ifail :: String -> Idris a
5355ifail = throwError . Msg