<?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="2003/01/127c0dc2af328c6b22ad0093c362749c"
  from="Maas-Maarten Zeeman &lt;maas@w...&gt;"
  author="Maas-Maarten Zeeman"
  date="2003-01-09T10:53:13"
  subject="[Caml-list] possible camlp4 problem/bug with literal booleans in expr quotations."
  prev="2003/01/ef04a27385c591a8234c591df26a7c87"
  next="2003/01/7e9a26db9c124348c333e11a6b9de462"
  next-in-thread="2003/01/7e9a26db9c124348c333e11a6b9de462"
  prev-thread="2003/01/ef04a27385c591a8234c591df26a7c87"
  next-thread="2003/01/37bde005f875aa75e55ca6ee21ec7ede"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] possible camlp4 problem/bug with literal booleans in expr quotations.">
<msg 
  url="2003/01/127c0dc2af328c6b22ad0093c362749c"
  from="Maas-Maarten Zeeman &lt;maas@w...&gt;"
  author="Maas-Maarten Zeeman"
  date="2003-01-09T10:53:13"
  subject="[Caml-list] possible camlp4 problem/bug with literal booleans in expr quotations.">
<msg 
  url="2003/01/7e9a26db9c124348c333e11a6b9de462"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2003-01-09T11:00:39"
  subject="Re: [Caml-list] possible camlp4 problem/bug with literal booleans in expr quotations.">
</msg>
</msg>
</thread>

<contents>
Hi,

I'm experimenting with camlp4 and found this problem.

file: forever.ml

   #load "q_MLast.cmo";;
   #load "pa_extend.cmo";;

   open Pcaml;;

   EXTEND
     expr: LEVEL "expr1"
       [ [ "forever"; body=expr -&gt;
              &lt;:expr&lt; while true do { $body$ } &gt;&gt; ] ];
   END;;

file: bar.ml

   let _ = forever print_string "0";

compilation:

   $ ocamlc -pp camlp4o -I +camlp4 -c forever.ml
   $ ocamlc -pp "camlp4o ./forever.cmo" bar.ml
   File "bar.ml", line 1, characters 8-33:
   Unbound value true

But when you substitute 1=1 for true this works as expected. Can true 
not be used as literal in expr quotations?

Thanks,

Maas


-------------------
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>

