diff --git a/CHANGELOG.md b/CHANGELOG.md index 0396d7e30e21124cc6704fca090b925fa4994b98..6b1744ab2efef13b1d99a979a69c73fc9cb89667 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Change log for curry-frontend Under development (1.0.1) ============= + * Fixed bug with wrong order of super classes in selector functions + generated by the dictionary transformation. * Changed desugaring of numeric literals. It now generates calls to the functions `Prelude.fromInt` and `Prelude.fromFloat`. * Fixed bug with wrong original names of imported record labels diff --git a/src/Env/Class.hs b/src/Env/Class.hs index 78941cd22d52c24d9d3c29cad2f88d1f57207646..4c6cd1eef278d4af0dc9a21f119fefadacc1aabd 100644 --- a/src/Env/Class.hs +++ b/src/Env/Class.hs @@ -23,7 +23,7 @@ module Env.Class , superClasses, allSuperClasses, classMethods, hasDefaultImpl ) where -import Data.List (nub) +import Data.List (nub, sort) import qualified Data.Map as Map (Map, empty, insertWith, lookup) import Curry.Base.Ident @@ -38,7 +38,8 @@ initClassEnv :: ClassEnv initClassEnv = Map.empty bindClassInfo :: QualIdent -> ClassInfo -> ClassEnv -> ClassEnv -bindClassInfo = Map.insertWith mergeClassInfo +bindClassInfo cls (sclss, ms) = + Map.insertWith mergeClassInfo cls (sort sclss, ms) -- We have to be careful when merging two class infos into one as hidden class -- declarations in interfaces provide no information about class methods. If