<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2006/02/7737a0dc5ef618b134b0d8fa4c1fa0e7"
  from="Jean-Christophe Filliatre &lt;filliatr@l...&gt;"
  author="Jean-Christophe Filliatre"
  date="2006-02-27T15:07:20"
  subject="Re: [Caml-list] Writing Identity Functors (or Wrapper modules) in OCAML"
  prev="2006/02/c180a32c9168e878ef5f354c793b7312"
  next="2006/02/db31e32f91da0114f964a0797b9d8b0d"
  prev-in-thread="2006/02/ff81f3a0998187a8f5ee076e75b3d851"
  prev-thread="2006/02/85b7b8c6a9056190fef150185cb50a3c"
  next-thread="2006/02/8fc9c1a56c497b9743515a5e3432d704"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Writing Identity Functors (or Wrapper modules) in OCAML">
<msg 
  url="2006/02/e5953c6e2320144461b87a07084530c0"
  from="Merijn de Jonge &lt;merijn.de.jonge@g...&gt;"
  author="Merijn de Jonge"
  date="2006-02-27T14:49:53"
  subject="Writing Identity Functors (or Wrapper modules) in OCAML">
<msg 
  url="2006/02/c180a32c9168e878ef5f354c793b7312"
  from="Julien Signoles &lt;signoles@l...&gt;"
  author="Julien Signoles"
  date="2006-02-27T15:04:56"
  subject="Re: [Caml-list] Writing Identity Functors (or Wrapper modules) in OCAML">
<msg 
  url="2006/02/db31e32f91da0114f964a0797b9d8b0d"
  from="Sebastian Egner &lt;sebastian.egner@p...&gt;"
  author="Sebastian Egner"
  date="2006-02-27T15:14:54"
  subject="Re: [Caml-list] Writing Identity Functors (or Wrapper modules) 	inOCAML">
<msg 
  url="2006/02/ff81f3a0998187a8f5ee076e75b3d851"
  from="Merijn de Jonge &lt;merijn.de.jonge@g...&gt;"
  author="Merijn de Jonge"
  date="2006-02-27T15:20:04"
  subject="Re: [Caml-list] Writing Identity Functors (or Wrapper modules) inOCAML">
</msg>
</msg>
</msg>
<msg 
  url="2006/02/7737a0dc5ef618b134b0d8fa4c1fa0e7"
  from="Jean-Christophe Filliatre &lt;filliatr@l...&gt;"
  author="Jean-Christophe Filliatre"
  date="2006-02-27T15:07:20"
  subject="Re: [Caml-list] Writing Identity Functors (or Wrapper modules) in OCAML">
</msg>
</msg>
</thread>

<contents>

Merijn de Jonge writes:
 &gt; 
 &gt; I've problems in writing an Identity Functor in OCAML that I want to use as
 &gt; a wrapper module.

A type representation is missing: you should write your wrapper as

======================================================================
      module Wrapper (X: IHelloWorld) : IHelloWorld =
       struct
         type helloWorldType = X.helloWorldType = Hello | World
         let hello = X.hello
       end
======================================================================

See the paragraph "Re-exported variant type or record type: an
equation, a representation." in section 6.8.1 of the Ocaml manual
(http://caml.inria.fr/pub/docs/manual-ocaml/manual016.html)

Hope this helps,
-- 
Jean-Christophe Filliātre (http://www.lri.fr/~filliatr)

</contents>

</message>

