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

please change exception string raised when comparing functional values #4539

Closed
vicuna opened this issue Apr 23, 2008 · 4 comments
Closed

please change exception string raised when comparing functional values #4539

vicuna opened this issue Apr 23, 2008 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Apr 23, 2008

Original bug ID: 4539
Reporter: ecc
Status: closed (set by @damiendoligez on 2015-01-16T21:50:47Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.1
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Tags: patch, junior_job
Monitored by: @gasche @yallop

Bug description

If f and g are functions, then
f = g, f < g, f >= g, etc. all produce the exception
Invalid_argument "equal: functional value"
Changing this to "compare: functional value" would be less confusing.

File attachments

@vicuna
Copy link
Author

vicuna commented Aug 4, 2008

Comment author: @damiendoligez

I'm not sure we want to make this change, since it might break some badly-written programs.

@vicuna
Copy link
Author

vicuna commented Sep 4, 2013

Comment author: @damiendoligez

I've changed my mind and I think we should do it.

@vicuna
Copy link
Author

vicuna commented Nov 8, 2013

Comment author: nbraud

Here is a tentative patch.

Seemed trivial enough to be easily done, and I tested that it works with the toplevel, the bytecode compiler and the native code compiler (at least on amd64).

@vicuna
Copy link
Author

vicuna commented Jan 16, 2015

Comment author: @damiendoligez

Patch applied in trunk (rev 15778).

@vicuna vicuna closed this as completed Jan 16, 2015
@vicuna vicuna added this to the 4.03.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant