Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
PLMZ
iTypes
Commits
0b2702b3
Commit
0b2702b3
authored
Sep 28, 2019
by
André Pacak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix copy paste error
parent
d93f4fe9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
haskell/src/FORecursiveTypes/EliminateContextArgument.hs
haskell/src/FORecursiveTypes/EliminateContextArgument.hs
+8
-4
No files found.
haskell/src/FORecursiveTypes/EliminateContextArgument.hs
View file @
0b2702b3
...
...
@@ -146,7 +146,8 @@ lookup tymap t x = case parent t of
if
name
==
x
then
do
ty
<-
requiredType
tymap
p
(
ty1
,
ty2
)
<-
matchFun
ty
(
show
p
)
rty
<-
matchTypeVar
tymap
ty
(
ty1
,
ty2
)
<-
matchFun
rty
(
show
p
)
return
ty1
else
lookup
tymap
p
x
Just
p
@
(
InL
term
_
)
->
do
...
...
@@ -157,14 +158,16 @@ lookup tymap t x = case parent t of
if
n1
==
x
then
do
ety
<-
inferType
tymap
e
(
ty1
,
ty2
)
<-
matchSum
ety
(
show
e
)
rty
<-
matchTypeVar
tymap
ety
(
ty1
,
ty2
)
<-
matchSum
rty
(
show
e
)
return
ty1
else
lookup
tymap
p
x
Just
p
@
(
Case
e
n1
t1
n2
t2
_
)
|
t
==
t2
->
if
n2
==
x
then
do
ety
<-
inferType
tymap
e
(
ty1
,
ty2
)
<-
matchSum
ety
(
show
e
)
rty
<-
matchTypeVar
tymap
ety
(
ty1
,
ty2
)
<-
matchSum
rty
(
show
e
)
return
ty2
else
lookup
tymap
p
x
Just
p
@
(
Tag
n
t'
_
)
|
t
==
t'
->
do
...
...
@@ -173,7 +176,8 @@ lookup tymap t x = case parent t of
lookup
tymap
p
x
Just
p
@
(
Match
m
cases
_
)
|
t
/=
m
->
do
ety
<-
inferType
tymap
m
typeMap
<-
matchVariant
ety
(
show
m
)
rty
<-
matchTypeVar
tymap
ety
typeMap
<-
matchVariant
rty
(
show
m
)
let
ml
=
find
(
\
(
_
,
x'
,
t'
)
->
t
==
t'
&&
x
==
x'
)
cases
if
isJust
ml
then
do
...
...
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