caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Deleting a type alias while including a module
@ 2011-11-24 16:35 Michael Grünewald
  2011-11-24 19:33 ` Michael Grünewald
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Grünewald @ 2011-11-24 16:35 UTC (permalink / raw)
  To: caml-list

Dear list,

I am trying to use destructive substitution to remove a type alias in an 
inclusion. Some module XArray has the following signature:

XArray: sig
  type 'a xarray
  type 'a t
end

and I would like to remove the 'a t in the resulting signature. I thought

include (XArray : module type of XArray
   with 'a t := 'a XArray.xarray
)

would do, but it would not:

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

Honestly, I do not really understand why the substitution can not 
happen, despite my careful reading of the documentation.  Any 
suggestions are welcome!
-- 
Michael


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-25  6:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-24 16:35 [Caml-list] Deleting a type alias while including a module Michael Grünewald
2011-11-24 19:33 ` Michael Grünewald
2011-11-24 23:53   ` Gabriel Scherer
2011-11-25  6:52     ` Michael Grünewald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).