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

Check arity of %compare primitive #2014

Closed
wants to merge 1 commit into from

Conversation

nojb
Copy link
Contributor

@nojb nojb commented Sep 3, 2018

See MPR#7846.

@hhugo
Copy link
Contributor

hhugo commented Sep 3, 2018

The problem exists with other primitives as well.

external a : ('a -> 'b) -> 'a = "%apply"
let () = a (fun x -> x)

@nojb
Copy link
Contributor Author

nojb commented Sep 3, 2018

Yes, this is known (see e.g https://caml.inria.fr/mantis/view.php?id=7408). Checking the arity of comparison primitives is easy but the general case is more work, and am not sure it is worth it given that it is an undocumented feature not meant for general use.

@hhugo hhugo mentioned this pull request Sep 3, 2018
@hhugo
Copy link
Contributor

hhugo commented Sep 3, 2018

I gave it a quick shot in #2015

@nojb
Copy link
Contributor Author

nojb commented Sep 3, 2018

Subsumed by #2015.

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

Successfully merging this pull request may close these issues.

2 participants