Skip to content

Commit 7873a98

Browse files
paf31garyb
authored andcommitted
Fix order of type class dictionaries passed to a function
1 parent 9010d98 commit 7873a98

File tree

1 file changed

+1
-1
lines changed
  • src/Language/PureScript/TypeChecker

1 file changed

+1
-1
lines changed

src/Language/PureScript/TypeChecker/Types.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ entails moduleName context goal@(className, ty) = do
238238
return $ Just dict
239239
mkDictionary :: Qualified Ident -> Maybe [Value] -> Value
240240
mkDictionary fnName Nothing = Var fnName
241-
mkDictionary fnName (Just dicts) = foldr (flip App) (Var fnName) dicts
241+
mkDictionary fnName (Just dicts) = foldl App (Var fnName) dicts
242242
filterModule :: TypeClassDictionaryInScope -> Bool
243243
filterModule (TypeClassDictionaryInScope { tcdName = Qualified (Just mn) _ }) | mn == moduleName = True
244244
filterModule (TypeClassDictionaryInScope { tcdName = Qualified Nothing _ }) = True

0 commit comments

Comments
 (0)