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

Fix wrong order of super class dictionaries in generated stub methods

parent b17e8226
......@@ -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
......@@ -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
Supports Markdown
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