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
c31e7efd
Commit
c31e7efd
authored
Jun 27, 2014
by
Julien Lopez
Browse files
Fix in typer
parent
3f1ff11d
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/misc/polyfuns.cd
View file @
c31e7efd
...
...
@@ -4,7 +4,7 @@ let fun f ( <a>l : T ) : Int = aux l;;
let fun aux ([('A)*] -> Int)
| [] -> 0
| (
x
,r) -> (aux r);;
| (
_
,r) -> (aux r);;
let a = f <a>[ 10 15 20 ];;
let b = f <a>[ 'a' 'b' 'c' ];;
typing/typer.ml
View file @
c31e7efd
...
...
@@ -947,13 +947,13 @@ and type_check' loc env ed constr precise = match ed with
|
Apply
(
e1
,
e2
)
->
let
t1
=
type_check
env
e1
Types
.
Arrow
.
any
true
in
let
t1arrow
=
Types
.
Arrow
.
get
t1
in
let
t1
=
Types
.
Positive
.
substitutefree
t1
in
(* t [_delta 0 -> 1 *)
begin
try
ignore
(
Types
.
Tallying
.
tallying
~
delta
:
env
.
delta
[(
t1
,
Types
.
Arrow
.
any
)])
with
Types
.
Tallying
.
UnSatConstr
_
->
raise_loc
loc
(
Constraint
(
t1
,
Types
.
Arrow
.
any
))
end
;
let
t1arrow
=
Types
.
Arrow
.
get
t1
in
let
dom
=
Types
.
Arrow
.
domain
(
t1arrow
)
in
let
res
=
if
not
(
Types
.
is_closed
env
.
delta
dom
)
then
...
...
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