@@ -269,6 +269,8 @@ elab ist info emode opts fn tm
269269 (h: hs) -> do patvar h; mkPat
270270 [] -> return ()
271271
272+ elabRec = elabE initElabCtxt Nothing
273+
272274 -- | elabE elaborates an expression, possibly wrapping implicit coercions
273275 -- and forces/delays. If you make a recursive call in elab', it is
274276 -- normally correct to call elabE - the ones that don't are desugarings
@@ -369,7 +371,7 @@ elab ist info emode opts fn tm
369371 UType _ -> elab' ina (Just fc) (PRef fc [] unitTy)
370372 _ -> elab' ina (Just fc) (PRef fc [] unitCon)
371373 elab' ina fc (PResolveTC (FC "HACK" _ _)) -- for chasing parent classes
372− = do g <- goal; resolveTC' False False 5 g fn ist
374+ = do g <- goal; resolveTC False False 5 g fn elabRec ist
373375 elab' ina fc (PResolveTC fc')
374376 = do c <- getNameFrom (sMN 0 "__class")
375377 instanceArg c
@@ -722,7 +724,7 @@ elab ist info emode opts fn tm
722724 hs <- get_holes
723725 if all (\n -> n == tyn || not (n `elem` hs)) (freeNames g)
724726 then handleError (tcRecoverable emode)
725− (resolveTC' True False 10 g fn ist)
727+ (resolveTC True False 10 g fn elabRec ist)
726728 (movelast n)
727729 else movelast n)
728730 (ivs' \\ ivs)
@@ -895,7 +897,7 @@ elab ist info emode opts fn tm
895897 hs <- get_holes
896898 if all (\n -> not (n `elem` hs)) (freeNames g)
897899 then handleError (tcRecoverable emode)
898− (resolveTC' False False 10 g fn ist)
900+ (resolveTC False False 10 g fn elabRec ist)
899901 (movelast n)
900902 else movelast n)
901903 (ivs' \\ ivs)