Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
curry
curry-frontend
Commits
9b17c498
Commit
9b17c498
authored
Dec 12, 2017
by
Finn Teegen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wrong order of super class dictionaries in generated stub methods
parent
b17e8226
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
CHANGELOG.md
CHANGELOG.md
+2
-0
src/Env/Class.hs
src/Env/Class.hs
+3
-2
No files found.
CHANGELOG.md
View file @
9b17c498
...
...
@@ -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
...
...
src/Env/Class.hs
View file @
9b17c498
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment