git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Remove duplicates from 'overlapping instances' error report
commitefdf341531a62c8093493f58dfb872c6ad88b502 authorBalaji R. Rao <balaji@raobalaji.com> dateWed 25 Mar 2015, 00:40 (12 years ago) parente1ecb6b
1 file changed+1−1
src/Language/PureScript/TypeChecker/Entailment.hs+1−1
src/Language/PureScript/TypeChecker/Entailment.hs+1−1
@@ -116,7 +116,7 @@ entails env moduleName context = solve (sortedNubBy canonicalizeDictionary (filt
116116 checkOverlaps :: [DictionaryValue] -> Check Expr
117117 checkOverlaps dicts =
118118 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)
120120 _ -> case chooseSimplestDictionaries dicts of
121121 [] -> throwError . errorMessage $ NoInstanceFound className tys
122122 d : _ -> return $ dictionaryValueToValue d