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
242037ad
Commit
242037ad
authored
Jun 27, 2018
by
Finn Teegen
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug with generated default implementations of nullary class methods
parent
8bc3e560
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
CHANGELOG.md
CHANGELOG.md
+1
-0
src/Transformations/Dictionary.hs
src/Transformations/Dictionary.hs
+4
-2
No files found.
CHANGELOG.md
View file @
242037ad
...
...
@@ -5,6 +5,7 @@ Version 1.0.2 (under development)
=============
*
Fixed bug with wrong type of free variables in the intermediate language.
*
Fixed bug with generated default implementations of nullary class methods.
Version 1.0.1
=============
...
...
src/Transformations/Dictionary.hs
View file @
242037ad
...
...
@@ -413,10 +413,12 @@ defaultClassMethodDecl :: QualIdent -> Ident -> DTM (Decl PredType)
defaultClassMethodDecl
cls
f
=
do
pty
@
(
PredType
_
ty
)
<-
getClassMethodType
cls
f
augEnv
<-
getAugEnv
let
pats
=
if
isAugmented
augEnv
(
qualifyLike
cls
f
)
let
augmented
=
isAugmented
augEnv
(
qualifyLike
cls
f
)
pats
=
if
augmented
then
[
ConstructorPattern
predUnitType
qUnitId
[]
]
else
[]
return
$
funDecl
NoPos
pty
f
pats
$
preludeError
(
instType
ty
)
$
ty'
=
if
augmented
then
arrowBase
ty
else
ty
return
$
funDecl
NoPos
pty
f
pats
$
preludeError
(
instType
ty'
)
$
"No instance or default method for class operation "
++
escName
f
getClassMethodType
::
QualIdent
->
Ident
->
DTM
PredType
...
...
Finn Teegen
@fte
mentioned in issue
#23 (closed)
·
Jun 27, 2018
mentioned in issue
#23 (closed)
mentioned in issue #23
Toggle commit list
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