@@ -269,6 +269,8 @@ elab ist info emode opts fn tm
269 (h: hs) -> do patvar h; mkPat
269 (h: hs) -> do patvar h; mkPat
270 [] -> return ()
270 [] -> return ()
272+ elabRec = elabE initElabCtxt Nothing
272 -- | elabE elaborates an expression, possibly wrapping implicit coercions
274 -- | elabE elaborates an expression, possibly wrapping implicit coercions
273 -- and forces/delays. If you make a recursive call in elab', it is
275 -- and forces/delays. If you make a recursive call in elab', it is
274 -- normally correct to call elabE - the ones that don't are desugarings
276 -- normally correct to call elabE - the ones that don't are desugarings
@@ -369,7 +371,7 @@ elab ist info emode opts fn tm
369 UType _ -> elab' ina (Just fc) (PRef fc [] unitTy)
371 UType _ -> elab' ina (Just fc) (PRef fc [] unitTy)
370 _ -> elab' ina (Just fc) (PRef fc [] unitCon)
372 _ -> elab' ina (Just fc) (PRef fc [] unitCon)
371 elab' ina fc (PResolveTC (FC "HACK" _ _)) -- for chasing parent classes
373 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
373 elab' ina fc (PResolveTC fc')
375 elab' ina fc (PResolveTC fc')
374 = do c <- getNameFrom (sMN 0 "__class")
376 = do c <- getNameFrom (sMN 0 "__class")
375 instanceArg c
377 instanceArg c
@@ -722,7 +724,7 @@ elab ist info emode opts fn tm
722 hs <- get_holes
724 hs <- get_holes
723 if all (\n -> n == tyn || not (n `elem` hs)) (freeNames g)
725 if all (\n -> n == tyn || not (n `elem` hs)) (freeNames g)
724 then handleError (tcRecoverable emode)
726 then handleError (tcRecoverable emode)
725− (resolveTC' True False 10 g fn ist)
727+ (resolveTC True False 10 g fn elabRec ist)
726 (movelast n)
728 (movelast n)
727 else movelast n)
729 else movelast n)
728 (ivs' \\ ivs)
730 (ivs' \\ ivs)
@@ -895,7 +897,7 @@ elab ist info emode opts fn tm
895 hs <- get_holes
897 hs <- get_holes
896 if all (\n -> not (n `elem` hs)) (freeNames g)
898 if all (\n -> not (n `elem` hs)) (freeNames g)
897 then handleError (tcRecoverable emode)
899 then handleError (tcRecoverable emode)
898− (resolveTC' False False 10 g fn ist)
900+ (resolveTC False False 10 g fn elabRec ist)
899 (movelast n)
901 (movelast n)
900 else movelast n)
902 else movelast n)
901 (ivs' \\ ivs)
903 (ivs' \\ ivs)