Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gilles Coremans
ASTTool
Commits
a0d3a69d
Commit
a0d3a69d
authored
Apr 24, 2020
by
marton bognar
Browse files
Attempt to fix well-formedness relation
parent
bcfef101
Changes
1
Hide whitespace changes
Inline
Side-by-side
SystemF/SystemFImpl.hs
View file @
a0d3a69d
...
...
@@ -71,14 +71,14 @@ fullEval t = maybe t (fullEval) t2
t2
=
stepEval
t
wellFormed
::
Type
->
Env
->
Bool
wellFormed
(
TyVar
i
)
env
=
case
(
nth
env
i
)
of
wellFormed
(
TyVar
i
)
env
=
case
(
nth
env
i
)
of
Nothing
->
False
Just
(
ETermVar
_
_
)
->
False
Just
(
ETypeVar
_
)
->
True
Just
Nil
->
False
wellFormed
(
TyArr
ty1
ty2
)
env
=
wellFormed
ty1
env
&&
wellFormed
ty2
env
wellFormed
(
TyAll
ty
)
(
ETypeVar
env
)
=
wellFormed
ty
env
wellFormed
(
TyBase
)
env
=
True
wellFormed
(
TyArr
ty1
ty2
)
env
=
wellFormed
ty1
env
&&
wellFormed
ty2
env
wellFormed
(
TyAll
ty
)
env
=
wellFormed
ty
(
ETypeVar
env
)
wellFormed
(
TyBase
)
env
=
True
typeOf
::
Term
->
Env
->
Either
String
Type
typeOf
(
TmVar
nat
)
ctx
=
getTypeFromEnv
ctx
nat
...
...
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