@@ -91,10 +91,13 @@ elabStep st e = case runStateT eCheck st of
9191 OK (a, st') -> return (a, st')
9292 Error a -> ierror a
9393 where eCheck = do res <- e
94− tm <- get_term
95− ctxt <- get_context
96− lift $ check ctxt [] (forget tm)
97− return res
94+ probs' <- get_probs
95+ case probs' of
96+ [] -> do tm <- get_term
97+ ctxt <- get_context
98+ lift $ check ctxt [] (forget tm)
99+ return res
100+ ((_,_,_,e,_,_):_) -> lift $ Error e
98101
99102dumpState :: IState -> ProofState -> Idris ()
100103dumpState ist (PS nm [] _ _ tm _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) =