Commit 9b17c498 authored by Finn Teegen's avatar Finn Teegen

Fix wrong order of super class dictionaries in generated stub methods

parent b17e8226
...@@ -4,6 +4,8 @@ Change log for curry-frontend ...@@ -4,6 +4,8 @@ Change log for curry-frontend
Under development (1.0.1) 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 * Changed desugaring of numeric literals. It now generates calls to the
functions `Prelude.fromInt` and `Prelude.fromFloat`. functions `Prelude.fromInt` and `Prelude.fromFloat`.
* Fixed bug with wrong original names of imported record labels * Fixed bug with wrong original names of imported record labels
......
...@@ -23,7 +23,7 @@ module Env.Class ...@@ -23,7 +23,7 @@ module Env.Class
, superClasses, allSuperClasses, classMethods, hasDefaultImpl , superClasses, allSuperClasses, classMethods, hasDefaultImpl
) where ) where
import Data.List (nub) import Data.List (nub, sort)
import qualified Data.Map as Map (Map, empty, insertWith, lookup) import qualified Data.Map as Map (Map, empty, insertWith, lookup)
import Curry.Base.Ident import Curry.Base.Ident
...@@ -38,7 +38,8 @@ initClassEnv :: ClassEnv ...@@ -38,7 +38,8 @@ initClassEnv :: ClassEnv
initClassEnv = Map.empty initClassEnv = Map.empty
bindClassInfo :: QualIdent -> ClassInfo -> ClassEnv -> ClassEnv 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 -- 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 -- declarations in interfaces provide no information about class methods. If
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment