Version française
Home     About     Download     Resources     Contact us    
Browse thread
type constraints involving variant types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christian Sternagel <christian.sternagel@u...>
Subject: type constraints involving variant types
Is it possible to give type constraints involving variant types?
If there is e.g.

module type A = sig
 type t = A of 'a | B of 'b
end

module type B = sig
 module A : A
end

Can I then do something like

module type C = sig
 module B : B
 module A : A
  with type t = B.A.t = A of 'a | B of 'b
end

The above yields a syntax error, but there should be a way of doing
that or not?

cheers

christian