You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal: make instatiation of a private record/variant raise a warning instead of an error #8458
Today, when you try to create a private record or variant, it errors:
moduleFoo= {
typet=private {foo: int}
}
letbar= {Foo.foo: 9} // Error: Cannot create values of the private type Foo.t
Though, there are cases where you'd want to force the instantiation for example for testing, moving this from an error to a warning would allow this. We could use the same warning when casting to a private record/variant (cf #8457)
Activity
fhammerschmidt commentedon May 31, 2026
Should it be an error that you can downgrade to a warning instead?
Or a warning by default that you can promote to an error?
tsnobip commentedon Jun 1, 2026
@fhammerschmidt I think it should be an error by default.