Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
curry-frontend
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
41
Issues
41
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
curry
curry-frontend
Commits
a15821f2
Commit
a15821f2
authored
Apr 15, 2019
by
Finn Teegen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug when deriving instances of Bounded type class
parent
f16590b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
CHANGELOG.md
CHANGELOG.md
+1
-0
curry-frontend.cabal
curry-frontend.cabal
+1
-1
src/Checks/InstanceCheck.hs
src/Checks/InstanceCheck.hs
+1
-1
src/Transformations/Derive.hs
src/Transformations/Derive.hs
+2
-2
No files found.
CHANGELOG.md
View file @
a15821f2
...
...
@@ -5,6 +5,7 @@ Version 1.0.4
=============
*
Fixed bug in type checking of instances
*
Fixed bugs in deriving of
`Bounded`
instances.
Version 1.0.3
=============
...
...
curry-frontend.cabal
View file @
a15821f2
Name: curry-frontend
Version: 1.0.
3
Version: 1.0.
4
Cabal-Version: >= 1.10
Synopsis: Compile the functional logic language Curry to several
intermediate formats
...
...
src/Checks/InstanceCheck.hs
View file @
a15821f2
...
...
@@ -196,7 +196,7 @@ bindDerivedInstance clsEnv p tc pty tys cls = do
,
(
fromEnumId
,
1
),
(
enumFromId
,
1
)
,
(
enumFromThenId
,
2
)
]
|
cls
==
qBoundedId
=
[(
maxBoundId
,
1
),
(
minBoundId
,
1
)]
|
cls
==
qBoundedId
=
[(
maxBoundId
,
0
),
(
minBoundId
,
0
)]
|
cls
==
qReadId
=
[(
readsPrecId
,
2
)]
|
cls
==
qShowId
=
[(
showsPrecId
,
2
)]
|
otherwise
=
...
...
src/Transformations/Derive.hs
View file @
a15821f2
...
...
@@ -274,8 +274,8 @@ enumFromThenExpr v1 v2 c1 c2 =
deriveBoundedMethods
::
Type
->
[
ConstrInfo
]
->
PredSet
->
DVM
[
Decl
PredType
]
deriveBoundedMethods
ty
cis
ps
=
sequence
[
deriveMaxOrMinBound
qM
ax
BoundId
ty
(
head
cis
)
ps
,
deriveMaxOrMinBound
qM
in
BoundId
ty
(
last
cis
)
ps
[
deriveMaxOrMinBound
qM
in
BoundId
ty
(
head
cis
)
ps
,
deriveMaxOrMinBound
qM
ax
BoundId
ty
(
last
cis
)
ps
]
deriveMaxOrMinBound
::
QualIdent
->
Type
->
ConstrInfo
->
PredSet
...
...
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