Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] type and modules... (sig mismatch again)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-06-18 (11:07)
From: Damien Pous <Damien.Pous@e...>
Subject: Re: [Caml-list] type and modules... (sig mismatch again)
Le mer 18/06/2003 à 12:41, Pietro Abate a écrit :
> my daily question :-))
my daily answer !

maybe I'm wrong (if so, please correct me) but I believe the module 
is built and its signature is inferred, and then this signature is
matched against the one you provide (A with ...) 
so the signature you provide isn't used to infer the types...

furthermore the hidden type constructor A for t1_t is "hidden for ever",
that is, you can't use it even under type constraint : 
'(A 5 : t1_t)' should not be accepted

I don't know what you plan to do with this, but maybe you should look at the
polymorphic variants :

type t1 = [`A]
type t2 = [t1 | `B]


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: