<?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="2002/12/38d206434ca03422a3daee596c95db10"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2002-12-10T12:25:03"
  subject="Re: [Caml-list] Camlp4: generating printers of types"
  prev="2002/12/4db92d885f25abeb12b667f7260c24a2"
  next="2002/12/453315f436ce183655c9744929e58bee"
  prev-in-thread="2002/12/bda14d3a04f2eedf91905a4eb42a9207"
  next-in-thread="2002/12/adca70ed0317d2ff1156d25d7bb3384b"
  prev-thread="2002/10/1dd4307f336f52923ec9c00bf50e6612"
  next-thread="2002/10/bd720bbf86918b2c2bc40fcc8d8f5f47"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Camlp4: generating printers of types">
<msg 
  url="2002/10/911fcb8a222e666411b28b0649e3d30d"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2002-10-09T13:13:19"
  subject="[Caml-list] Camlp4: generating printers of types">
<msg 
  url="2002/12/bda14d3a04f2eedf91905a4eb42a9207"
  from="Ken Rose &lt;kenarose@e...&gt;"
  author="Ken Rose"
  date="2002-12-10T02:02:03"
  subject="Re: [Caml-list] Camlp4: generating printers of types">
<msg 
  url="2002/12/38d206434ca03422a3daee596c95db10"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2002-12-10T12:25:03"
  subject="Re: [Caml-list] Camlp4: generating printers of types">
<msg 
  url="2002/12/adca70ed0317d2ff1156d25d7bb3384b"
  from="Ken Rose &lt;kenarose@e...&gt;"
  author="Ken Rose"
  date="2002-12-10T15:33:32"
  subject="Re: [Caml-list] Camlp4: generating printers of types">
<msg 
  url="2002/12/be95aad281fdfa0b0e17d2aadce6fe33"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2002-12-10T17:38:21"
  subject="Re: [Caml-list] Camlp4: generating printers of types">
</msg>
</msg>
</msg>
<msg 
  url="2002/12/78f7eb64b20320970621cfe5b9407fa8"
  from="Damien Doligez &lt;damien.doligez@i...&gt;"
  author="Damien Doligez"
  date="2002-12-10T13:21:15"
  subject="Re: [Caml-list] Camlp4: generating printers of types">
</msg>
</msg>
<msg 
  url="2002/10/c2f4146f681d505fc6e36fd0892119d5"
  from="Markus Mottl &lt;markus@o...&gt;"
  author="Markus Mottl"
  date="2002-10-09T17:18:14"
  subject="Re: [Caml-list] Camlp4: generating printers of types">
</msg>
<msg 
  url="2002/10/6b5af3e32f8ae3e379720ca547b582df"
  from="Ken Rose &lt;kenarose@e...&gt;"
  author="Ken Rose"
  date="2002-10-25T19:20:41"
  subject="Re: [Caml-list] Camlp4: generating printers of types">
<msg 
  url="2002/10/e90a6df400ab02125298d0c75314986e"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-10-25T20:02:23"
  subject="Re: [Caml-list] Camlp4: generating printers of types">
</msg>
<msg 
  url="2002/10/b87035709e416e656037bec29d7ea9c8"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2002-10-26T00:11:55"
  subject="Re: [Caml-list] Camlp4: generating printers of types">
</msg>
</msg>
</msg>
</thread>

<contents>
Hi,

On Mon, Dec 09, 2002 at 06:01:41PM -0800, Ken Rose wrote:

&gt; 1. Is there a clean way to handle (sum) types with constructors with
&gt; multiple module qualifications?  I hacked the example to deal with
&gt; Foo.bar, but it doesn't seem to extend automatically to Foo.Bar.baz.  As
&gt; I understand it, I'd need a new pattern for each additional uid.

I don't understand that: in the type definition, there is no qualifications
for the constructors.

&gt; 2. How are tuples represented in camlp4's syntax?  This is so I can
&gt; match them when analyzing a type.

In Revised syntax, they are like in normal syntax, but the parentheses
are compulsory.

&gt; 3. This is the big one.  When working on a type like:
&gt; type t = int
&gt; with the obvious extention to Daniel's code, the preprocessor produces
&gt; type t = int let rec print_t = print_int
&gt; Which the compiler rejects with "This kind of expression is not allowed
&gt; as right-hand side of `let rec'"  I haven't been able to figure out a
&gt; way to sneak it past, either.  What's going on here?  Why can't I rename
&gt; print_int?

This message of OCaml just means that there are syntactic restrictions
of the "let rec". In this case, you should produce either a "let" without
"rec" or, an eta extension: "let rec print_t x = print_int x".

-- 
Daniel de RAUGLAUDRE
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

