git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #998 from balajirrao/master

Remove duplicates from 'overlapping instances' error report

commit8f8615b9393b3e619695e1cbf40987a22445c430 authorPhil Freeman <paf31@cantab.net> dateTue 24 Mar 2015, 13:27 (12 years ago) parente1ecb6befdf341
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