@@ -1979,7 +1979,9 @@ elabInstance info syn what fc cs n ps t expn ds = do
19791979 i <- getIState
19801980 (n, ci) <- case lookupCtxtName n (idris_classes i) of
19811981 [c] -> return c
1982− _ -> ifail $ show fc ++ ":" ++ show n ++ " is not a type class"
1982+ [] -> ifail $ show fc ++ ":" ++ show n ++ " is not a type class"
1983+ cs -> tclift $ tfail $ At fc
1984+ (CantResolveAlts (map (show . fst) cs))
19831985 let constraint = PApp fc (PRef fc n) (map pexp ps)
19841986 let iname = mkiname n ps expn
19851987 when (what /= EDefns) $ do