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

Remove dead code and fix documentation. #685

Merged
merged 1 commit into from
Jul 22, 2016
Merged

Remove dead code and fix documentation. #685

merged 1 commit into from
Jul 22, 2016

Conversation

johanneskloos
Copy link

The documentation for BatInt.of_string was misleading:
The current implementation throws Failure, not Invalid_argument.

This is because the implementation being referred to was dead code,
which is being removed in this commit.

The documentation for BatInt.of_string was misleading:
The current implementation throws Failure, not Invalid_argument.

This is because the implementation being referred to was dead code,
which is being removed in this commit.
@johanneskloos
Copy link
Author

This patch makes BatInt compatible with BatFloat, BatInt32 and BatInt64. If you prefer, I also have a patch that works the other way round, changing the exception behviour of {Batint,BatFloat,BatIn32,BatInt64}.of_string to raise Invalid_argument instead of failure.

@gasche gasche merged commit 453817c into ocaml-batteries-team:master Jul 22, 2016
@gasche
Copy link
Member

gasche commented Jul 22, 2016

Using Failure is the correct choice to remain consistent with the compiler distribution's standard library: int_of_string, or Int32.of_string, both use Failure rather than Invalid_argument. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants