@@ -116,7 +116,7 @@ entails env moduleName context = solve (sortedNubBy canonicalizeDictionary (filt
116 checkOverlaps :: [DictionaryValue] -> Check Expr
116 checkOverlaps :: [DictionaryValue] -> Check Expr
117 checkOverlaps dicts =
117 checkOverlaps dicts =
118 case [ (d1, d2) | d1 <- dicts, d2 <- dicts, d1 `overlapping` d2 ] of
118 case [ (d1, d2) | d1 <- dicts, d2 <- dicts, d1 `overlapping` d2 ] of
119− ds@(_ : _) -> throwError . errorMessage $ OverlappingInstances className tys (map fst ds)
119+ ds@(_ : _) -> throwError . errorMessage $ OverlappingInstances className tys $ nub (map fst ds)
120 _ -> case chooseSimplestDictionaries dicts of
120 _ -> case chooseSimplestDictionaries dicts of
121 [] -> throwError . errorMessage $ NoInstanceFound className tys
121 [] -> throwError . errorMessage $ NoInstanceFound className tys
122 d : _ -> return $ dictionaryValueToValue d
122 d : _ -> return $ dictionaryValueToValue d