As a complement to my previous message, here is a minimal (well, short!) example displaying the behavior I cannot go around:

----8<--- example starts here ----
module type XARRAY =
sig
  type 'a xarray
  type 'a t = 'a xarray
end

module XArray : XARRAY =
struct
  type 'a xarray = 'a
  type 'a t = 'a xarray
end

module UseXArray =
struct
  include (XArray : XARRAY with type 'a t := 'a XArray.xarray )
end
----8<---- example ends here ----
Trying to compile this file yields the following error:

File "include_substitute.ml", line 15, characters 20-61:
Error: In this `with' constraint, the new definition of t
       does not match its original definition in the constrained signature:
       Type declarations do not match:
         type 'a t = 'a XArray.xarray
       is not included in
         type 'a t = 'a xarray

(OCaml 3.12.1 on FreeBSD/amd64)

--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to