Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry
curry-frontend
Commits
96e09135
Commit
96e09135
authored
Oct 15, 2014
by
Jan Rasmus Tikovsky
Browse files
Small fix
parent
40e4249d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Checks/TypeCheck.hs
View file @
96e09135
...
...
@@ -1062,7 +1062,6 @@ unifyTypes _ _ (TypeSkolem k1) (TypeSkolem k2)
|
k1
==
k2
=
Right
idSubst
unifyTypes
m
tcEnv
(
TypeRecord
fs1
Nothing
)
tr2
@
(
TypeRecord
fs2
Nothing
)
|
length
fs1
==
length
fs2
=
unifyTypedLabels
m
tcEnv
fs1
tr2
unifyTypes
m
_
ty1
ty2
=
Left
(
errIncompatibleTypes
m
ty1
ty2
)
unifyTypes
m
tcEnv
tr1
@
(
TypeRecord
_
Nothing
)
(
TypeRecord
fs2
(
Just
a2
))
=
either
Left
(
\
res
->
either
Left
...
...
@@ -1091,6 +1090,7 @@ unifyTypes m tcEnv (TypeRecord fs1 (Just a1)) tr2@(TypeRecord fs2 (Just a2)) =
maybe
(
split'
fs1'
((
l
,
ty
)
:
rs1
)
rs2
ltys
)
(
const
(
split'
((
l
,
ty
)
:
fs1'
)
rs1
(
remove
l
rs2
)
ltys
))
(
lookup
l
rs2
)
unifyTypes
m
_
ty1
ty2
=
Left
(
errIncompatibleTypes
m
ty1
ty2
)
unifyTypeLists
::
ModuleIdent
->
TCEnv
->
[
Type
]
->
[
Type
]
->
Either
Doc
TypeSubst
unifyTypeLists
_
_
[]
_
=
Right
idSubst
...
...
Write
Preview
Supports
Markdown
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