Version française
Home     About     Download     Resources     Contact us    
Browse thread
Oddness concerning private variants in 3.10.0
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques GARRIGUE <garrigue@m...>
Subject: Re: [Caml-list] Oddness concerning private variants in 3.10.0
From: "Chris King" <colanderman@gmail.com>
> 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.

This looks like a bug report, but I clearly miss information to solve it.

> Compiling this:
> 
> module A: sig
>   type t = [ `A | `B ]
> end = struct
>   type t = private [> `A ]
> end
> 
> results in the error:

It certainly should: here the signature is written first!
If you write it the other way round, it is accepted without problem.

Concerning your first problem, could you submit a bu report, attaching
relevant information?

Jacques Garrigue