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

OptParse.OptParser.error should return 'a not unit #23

Closed
ygrek opened this issue Aug 29, 2015 · 1 comment
Closed

OptParse.OptParser.error should return 'a not unit #23

ygrek opened this issue Aug 29, 2015 · 1 comment
Assignees

Comments

@ygrek
Copy link
Owner

ygrek commented Aug 29, 2015

Originally reported on Google Code with ID 18

The error function is guaranteed to always terminate the process rather than returning.
Therefore, it should be declared as returning 'a (that is, *anything*) rather than
unit. This means it can be called in e.g. conditional branches where values would otherwise
be required. I see that the last line of the error function is call to Pervasives.exit
(in the manual exit's return type is declared as 'a I believe for this exact reason)
so this is a change to interface only that doesn't require any changes to the implementation.

Reported by headch on 2010-09-02 02:37:48

@ygrek ygrek self-assigned this Aug 29, 2015
@ygrek
Copy link
Owner Author

ygrek commented Aug 29, 2015

This issue was closed by revision r420.

Reported by ygrekheretix on 2013-11-12 15:35:48

  • Status changed: Fixed

@ygrek ygrek closed this as completed Aug 29, 2015
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