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
Raphaël Cauderlier
Sigmaid
Commits
c01870cc
Commit
c01870cc
authored
Jun 27, 2014
by
Raphaël Cauderlier
Browse files
Typo
parent
bc968c1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
typer.ml
View file @
c01870cc
...
...
@@ -54,7 +54,9 @@ let rec infer : tterm -> sty = function
|
Tcast
(
_
,
_
,
ty
)
->
ty
and
infer_meth
(
Tmeth
(
_
,
_
,
_
,
ty
))
=
ty
exception
Subype_checking_error
of
sty
*
sty
exception
Subtype_checking_error
of
sty
*
sty
let
dummy_var
=
(
Id
"_self"
)
let
rec
type_term
env
:
sterm
->
tterm
=
function
|
Svar
(
x
,
ty
)
->
Tvar
(
x
,
ty
)
...
...
@@ -69,7 +71,7 @@ let rec type_term env : sterm -> tterm = function
if
subtype
ty2
ty1l
then
Tapp
(
tt1
,
Tcast
(
tt2
,
ty2
,
ty1l
)
,
ty1l
,
ty1r
)
else
raise
(
Subype_checking_error
(
ty2
,
ty1l
))
raise
(
Sub
t
ype_checking_error
(
ty2
,
ty1l
))
|
Sabst
(
x
,
ty
,
body
)
->
let
tbody
=
type_term
((
x
,
ty
)
::
env
)
body
in
Tabst
(
x
,
ty
,
tbody
,
infer
tbody
)
...
...
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