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

manual: precise constraints on reexported types #8515

merged 3 commits into from Mar 19, 2019


Copy link

commented Mar 18, 2019

This small PR proposes to precise in the manual that reexported variant or record type constructors must have the same arity and type constraints as the original type constructor. For instance, both reexported types in

type 'a t = A
type reexport_wrong_arity = int t = A
type 'a reexport_wrong_constraint = int t = A 

are erroneous due to arity or constraint mismatches.

Along the way, I added few tests for reexported type mismatches in the second commit.

gasche approved these changes Mar 18, 2019
Copy link

left a comment

Nice, thanks! (This could be cherry-picked in 4.08 if you would like to.)


This comment has been minimized.

Copy link
Contributor Author

commented Mar 18, 2019

I think it is fine to wait for the 4.09 release in this case.

@Octachron Octachron force-pushed the Octachron:reexport_constraint branch from aaa3365 to c929ace Mar 18, 2019
@Octachron Octachron merged commit cd0933f into ocaml:trunk Mar 19, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
@Octachron Octachron deleted the Octachron:reexport_constraint branch Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.