@@ -86,9 +86,14 @@ prove opt ctxt lit n ty
8686 [([], P Ref n ty, ptm')] ty)
8787 solveDeferred n
8888elabStep :: ElabState [PDecl] -> ElabD a -> Idris (a, ElabState [PDecl])
89−elabStep st e = do case runStateT e st of
89+elabStep st e = case runStateT eCheck st of
9090 OK (a, st') -> return (a, st')
9191 Error a -> ierror a
92+ where eCheck = do res <- e
93+ tm <- get_term
94+ ctxt <- get_context
95+ lift $ check ctxt [] (forget tm)
96+ return res
9297
9398dumpState :: IState -> ProofState -> Idris ()
9499dumpState ist (PS nm [] _ _ tm _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) =