packages feed

purescript 0.4.15 → 0.4.15.1

raw patch · 2 files changed

+3/−3 lines, 2 files

Files

purescript.cabal view
@@ -1,5 +1,5 @@ name: purescript-version: 0.4.15+version: 0.4.15.1 cabal-version: >=1.8 build-type: Custom license: MIT
src/Language/PureScript/TypeChecker/Types.hs view
@@ -291,14 +291,14 @@ -- entails :: Environment -> ModuleName -> [TypeClassDictionaryInScope] -> (Qualified ProperName, [Type]) -> Check Value entails env moduleName context goal@(className, tys) = do-  case nub (go goal) of+  case go goal of     [] -> throwError . strMsg $ "No instance found for " ++ show className ++ " " ++  unwords (map prettyPrintTypeAtom tys)     [dict] -> return (dictionaryValueToValue dict)     _ -> throwError . strMsg $ "Overlapping instances found for " ++ show className ++ " " ++ unwords (map prettyPrintTypeAtom tys)   where   go (className', tys') =     [ mkDictionary (canonicalizeDictionary tcd) args-    | tcd <- context+    | tcd <- nubBy ((==) `on` canonicalizeDictionary) context     -- Choose type class dictionaries in scope in the current module     , filterModule tcd     -- Make sure the type class name matches the one we are trying to satisfy