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
cduce
cduce
Commits
0c5127b2
Commit
0c5127b2
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2002-10-21 21:21:42 by cvscast] Empty log message
Original author: cvscast Date: 2002-10-21 21:21:42+00:00
parent
57f3390a
Changes
1
Hide whitespace changes
Inline
Side-by-side
typing/typer.ml
View file @
0c5127b2
...
...
@@ -507,6 +507,19 @@ and type_check' loc env e constr precise = match e with
let
res
=
Sequence
.
concat
t1
t2
in
check
loc
res
constr
""
;
if
precise
then
res
else
constr
|
Op
(
"flatten"
,
[
e
])
->
let
constr'
=
Sequence
.
star
(
Sequence
.
approx
(
Types
.
cap
Sequence
.
any
constr
))
in
let
sconstr'
=
Sequence
.
star
constr'
in
let
exact
=
Types
.
subtype
constr'
constr
in
if
exact
then
let
t
=
type_check
env
e
sconstr'
precise
in
if
precise
then
Sequence
.
flatten
t
else
constr
else
let
t
=
type_check
env
e
sconstr'
true
in
let
res
=
Sequence
.
flatten
t
in
check
loc
res
constr
""
;
if
precise
then
res
else
constr
|
_
->
let
t
:
Types
.
descr
=
compute_type'
loc
env
e
in
check
loc
t
constr
""
;
...
...
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