<?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/07/d4d6779e696c7436b44b4b3962ecc363"
  from="Dmitry Bely &lt;dbely@m...&gt;"
  author="Dmitry Bely"
  date="2003-07-08T15:38:47"
  subject="Re: [Caml-list] camlp4"
  prev="2003/07/78cbf79a429ca7bbb1384f0f0d69c246"
  next="2003/07/14786d6aaf407cffe11e541113f6b25b"
  prev-in-thread="2003/07/3602dd50ba7b695ba1cd813784db4fb4"
  next-in-thread="2003/07/624777314e6c3b0f7ad344d329fa309e"
  prev-thread="2003/07/a271f4688bedcc68d89571a4f7b2cc1f"
  next-thread="2003/07/f403c5aea2503d60d196e2a58761da75"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] -unsafe and camlp4">
<msg 
  url="2003/07/d4567e135396aa37ca95126cae72c96f"
  from="Dmitry Bely &lt;dbely@m...&gt;"
  author="Dmitry Bely"
  date="2003-07-08T12:49:28"
  subject="[Caml-list] -unsafe and camlp4">
<msg 
  url="2003/07/3602dd50ba7b695ba1cd813784db4fb4"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-07-08T13:38:19"
  subject="Re: [Caml-list] -unsafe and camlp4">
<msg 
  url="2003/07/d4d6779e696c7436b44b4b3962ecc363"
  from="Dmitry Bely &lt;dbely@m...&gt;"
  author="Dmitry Bely"
  date="2003-07-08T15:38:47"
  subject="Re: [Caml-list] camlp4">
<msg 
  url="2003/07/624777314e6c3b0f7ad344d329fa309e"
  from="Damien Doligez &lt;Damien.Doligez@i...&gt;"
  author="Damien Doligez"
  date="2003-07-22T11:17:55"
  subject="Re: [Caml-list] camlp4">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Xavier Leroy &lt;xavier.leroy@inria.fr&gt; writes:

&gt;&gt; Can two things live together? When I run ocamlopt -unsafe -pp
&gt;&gt; "camlp4 ..." ..., compiler prints warning and -unsafe seems to be
&gt;&gt; ignored. Am I doing something wrong?
&gt;
&gt; "-unsafe" is a parsing-time option: it governs how the .[] and .()
&gt; notations are parsed into applications of functions from the Array and
&gt; String modules.  Hence, if you use camlp4 for parsing, you should pass
&gt; the -unsafe option to camlp4, not to ocamlc/ocamlopt.

Ah, I see. thank you very much.

There is another problem with camlp4. When it reports syntax error, it
doesn't count the lines, say:

File "test.ml", line 1, characters 12398-12401:
&lt;...&gt;

(line is always equal to 1, at least under Windows)

I compile Ocaml sources within XEmacs/Win32/tuareg mode, and Emacs consider
EOL in the buffer as ONE character, while camlp4 counts it as TWO chars. So
the error place is pointed incorrectly.

How do you think, where it could be fixed? (camlp4, tuareg,...)?

- Dmitry Bely


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

