@@ -339,11 +339,16 @@ pprintErr' i (ReflectionFailed msg err) =
339 text "When attempting to perform error reflection, the following internal error occurred:" <>
339 text "When attempting to perform error reflection, the following internal error occurred:" <>
340 indented (pprintErr' i err) <>
340 indented (pprintErr' i err) <>
341 text ("This is probably a bug. Please consider reporting it at " ++ bugaddr)
341 text ("This is probably a bug. Please consider reporting it at " ++ bugaddr)
342−pprintErr' i (ElabDebug mstr tm holes) =
342+pprintErr' i (ElabDebug msg tm holes) =
343 text "Elaboration halted." <>
343 text "Elaboration halted." <>
344− maybe empty (indented . text) mstr <>
344+ maybe empty (indented . text) msg <> line <>
345− text "Term: TODO PRINT TERM" <>
345+ text "Term: " <> pprintTerm' i [] (delab i tm) <> line <>
346− text "Holes: TODO PRINT AND PRESERVE"
346+ text "Holes:" <>
347+ (indented . vsep . flip map holes)
348+ (\(hn, goal, env) ->
349+ vsep (flip map env (\(n, b) -> annName' n (show n) <+> text ":" <+> pprintTerm' i [] (delab i (binderTy b)))) <> -- TODO: nested binders
350+ line <> text "----------------------------------" <> line <>
351+ annName' hn (show hn) <+> text ":" <+> pprintTerm' i (zip (map fst env) (repeat True)) (delab i goal) <> line)
348-- | Make sure the machine invented names are shown helpfully to the user, so
353-- | Make sure the machine invented names are shown helpfully to the user, so
349-- that any names which differ internally also differ visibly
354-- that any names which differ internally also differ visibly