@@ -383,8 +383,10 @@ resTC' tcs defaultOn topholes depth topg fn elab ist
383 let (argsok, okholePos) = case tcArgsOK g topholes of
383 let (argsok, okholePos) = case tcArgsOK g topholes of
384 Nothing -> (False, [])
384 Nothing -> (False, [])
385 Just hs -> (True, hs)
385 Just hs -> (True, hs)
386 if not argsok -- && not mvok)
388 if not argsok -- && not mvok)
387− then lift $ tfail $ CantResolve True topg
389+ then lift $ tfail $ CantResolve True topg (probErr probs)
389 ptm <- get_term
391 ptm <- get_term
390 ulog <- getUnifyLog
392 ulog <- getUnifyLog
@@ -431,6 +433,9 @@ resTC' tcs defaultOn topholes depth topg fn elab ist
431 _ -> Just rs
433 _ -> Just rs
432 tcDetArgsOK _ _ _ [] = Just []
434 tcDetArgsOK _ _ _ [] = Just []
437+ probErr ((_,_,_,_,err,_,_) : _) = err
434 isMeta :: [Name] -> Term -> Bool
439 isMeta :: [Name] -> Term -> Bool
435 isMeta ns (P _ n _) = n `elem` ns
440 isMeta ns (P _ n _) = n `elem` ns
436 isMeta _ _ = False
441 isMeta _ _ = False
@@ -462,12 +467,13 @@ resTC' tcs defaultOn topholes depth topg fn elab ist
462 boundVar (P Bound _ _) = True
467 boundVar (P Bound _ _) = True
463 boundVar _ = False
468 boundVar _ = False
470+ blunderbuss t d stk [] = do ps <- get_probs
465− blunderbuss t d stk [] = lift $ tfail $ CantResolve False topg
471+ lift $ tfail $ CantResolve False topg (probErr ps)
466 blunderbuss t d stk (n:ns)
472 blunderbuss t d stk (n:ns)
467 | n /= fn -- && (n `elem` stk)
473 | n /= fn -- && (n `elem` stk)
468 = tryCatch (resolve n d)
474 = tryCatch (resolve n d)
469 (\e -> case e of
475 (\e -> case e of
470− CantResolve True _ -> lift $ tfail e
476+ CantResolve True _ _ -> lift $ tfail e
471 _ -> blunderbuss t d stk ns)
477 _ -> blunderbuss t d stk ns)
472 | otherwise = blunderbuss t d stk ns
478 | otherwise = blunderbuss t d stk ns