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
799e9886
Commit
799e9886
authored
Apr 04, 2019
by
Kai Prott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Type-Check for instance declarations with ambiguous funtion names
parent
ea5b521e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
CHANGELOG.md
CHANGELOG.md
+5
-1
src/Checks/TypeCheck.hs
src/Checks/TypeCheck.hs
+5
-1
No files found.
CHANGELOG.md
View file @
799e9886
Change log for curry-frontend
=============================
Version 1.0.4
=============
*
Fixed bug in type checking of instances
Version 1.0.3
=============
...
...
@@ -308,4 +313,3 @@ Version 0.3.0
*
All compiler warnings removed.
*
Fixed various implementation bugs (#9, #16, #19, #29, #289).
src/Checks/TypeCheck.hs
View file @
799e9886
...
...
@@ -869,7 +869,11 @@ tcTopPDecl (i, ClassDecl p cx cls tv ds) = withLocalSigEnv $ do
tcTopPDecl
(
i
,
InstanceDecl
p
cx
qcls
ty
ds
)
=
do
tcEnv
<-
getTyConsEnv
pty
<-
expandPoly
$
QualTypeExpr
NoSpanInfo
cx
ty
vpds'
<-
mapM
(
tcInstanceMethodPDecl
qcls
pty
)
vpds
mid
<-
getModuleIdent
let
origCls
=
getOrigName
mid
qcls
tcEnv
clsQual
=
head
$
filter
isQualified
$
reverseLookupByOrigName
origCls
tcEnv
qQualCls
=
qualQualify
(
fromJust
$
qidModule
clsQual
)
qcls
vpds'
<-
mapM
(
tcInstanceMethodPDecl
qQualCls
pty
)
vpds
return
(
i
,
InstanceDecl
p
cx
qcls
ty
$
fromPDecls
$
map
untyped
opds
++
vpds'
)
where
(
vpds
,
opds
)
=
partition
(
isValueDecl
.
snd
)
$
toPDecls
ds
tcTopPDecl
_
=
internalError
"Checks.TypeCheck.tcTopDecl"
...
...
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