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

This library prevents me from using OCaml 4.08's Result module #8

Closed
alan-j-hu opened this issue Jul 29, 2019 · 6 comments · Fixed by #9
Closed

This library prevents me from using OCaml 4.08's Result module #8

alan-j-hu opened this issue Jul 29, 2019 · 6 comments · Fixed by #9

Comments

@alan-j-hu
Copy link

When I have this library as a dependency (including as a transitive one), I can't use the Result library from OCaml 4.08. However, I can work around it by doing Stdlib.Result.

result-bug.tar.gz

As this library already checks the OCaml version, perhaps it could check for OCaml 4.08 and include the standard library's Result module.

@hhugo
Copy link

hhugo commented Sep 1, 2019

What about we make installing result on ocaml >= 4.08 a no-op

@hcarty
Copy link

hcarty commented Nov 20, 2019

Are there any issues with @hhugo's suggestion to make result installation a no-op on newer OCaml versions? It would be nice to not need to open Stdlib to get around the result package clobbering the Result module.

@hongchangwu
Copy link

hongchangwu commented Nov 20, 2019

I believe making result installation a no-op on ocaml >= 4.08 will break existing packages that use result. The result type from this package is called Result.result while the one from Stdlib is called Result.t.

@hcarty
Copy link

hcarty commented Nov 30, 2019

@hongchangwu That's a very good point. Rather than making it a no-op, are there any issues with this library defining Result under OCaml >= 4.08.0 as:

include Result
type ('ok, 'error) result = ('ok, 'error) t

It would be nice to not have to hack around this shadowing when using newer OCaml releases.

@aantron
Copy link
Collaborator

aantron commented Jan 28, 2020

The t alias should be added to all versions (while include Result only on >= 4.08).

@aantron
Copy link
Collaborator

aantron commented Feb 1, 2020

I'll send a PR in the coming days.

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 a pull request may close this issue.

5 participants