-
Notifications
You must be signed in to change notification settings - Fork 106
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
Add equality between Stdlib.result and BatInnerPervasives.result #939
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I we do this, then batteries will become incompatible with earlier versions of the compiler.
The right way to work around this is to create the type for compiler which version is lesser than the one where the result type appeared in the Stdlib, and to equate the types after that point.
That is why we have a source preprocessor in batteries (the *.mlv and *.mliv files).
So in this case, the change should be prepended with ##V>=X##
and the alternative with ##V<X##
.
According to OCaml "Changes" file, the result type appeared in OCaml v4.08. |
okay, I see. Makes sense. Thanks, I'll do that. |
A possible test is to opam switch to 4.07 and compile batteries, then switch to 4.08 and recompile. |
The |
so, no need to change the type definition? |
For things which are version-dependant, you can use preprocessor directives, as stated before by rixed. |
As a matter of fact, the compatibility with the |
Superseeded by #957 |
See #938
I agreed with the point raised by the issue author. I don't think more changes are needed. If I missed some places to put tests, I'd like to know.