Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect type inferred for untypable expression #6

Open
jdh30 opened this issue Sep 16, 2018 · 0 comments
Open

Incorrect type inferred for untypable expression #6

jdh30 opened this issue Sep 16, 2018 · 0 comments

Comments

@jdh30
Copy link

jdh30 commented Sep 16, 2018

The inference:

> (fun a -> (fun b -> a(a b))) (fun c -> (fun d -> (fun e -> e c d)))
(('a -> (('b -> ('a -> 'c)) -> 'c)) -> ('a -> ((('a -> (('b -> ('a -> 'c)) -> 'c)) -> ('a -> 'c)) -> 'c)))

is wrong. The actual type is recursive:

# (fun a -> (fun b -> a(a b))) (fun c -> (fun d -> (fun e -> e c d)));;
- : ('_b -> ('a -> '_b -> '_c) -> '_c as 'a) -> 'a = <fun>

So it should be rejected by Algorithm W.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant