Browse thread
Oddness concerning private variants in 3.10.0
- Chris King
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Chris King <colanderman@g...> |
| Subject: | Oddness concerning private variants in 3.10.0 |
Hi, I just took the leap to 3.10 and encountered some strangeness compiling my project with it: The implementation input_test.ml does not match the interface (inferred signature): Type declarations do not match: type button = FrGui.button is not included in type button = FrGui.button#row First, I don't understand how a module doesn't match its inferred signature. Strangely, creating a blank input_test.mli file gets around this error. Second, the type button (which is a private variant) isn't even defined in input_test.ml, it's defined in a module opened by it. I tried coming up with some minimal test cases and found even more interesting results: Compiling this: module A: sig type t = [ `A | `B ] end = struct type t = private [> `A ] end results in the error: Type declarations do not match: type t = private [> `A ] is not included in type t = [ `A | `B ] But compiling this: type t = [ `A | `B ] with this .mli file: type t = private [> `A ] works fine. What is going on here? I haven't yet been able to reproduce the error in my project using a minimal test case but I will post it when I do. Thanks, Chris