English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] 3.07: debug information on camlp4-processed files is missing the file name?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-01-07 (05:47)
From: Aleksey Nogin <nogin@c...>
Subject: Re: [Caml-list] 3.07: debug information on camlp4-processed files is missing the file name?
On 05.01.2004 12:18, Damien Doligez wrote:

> You can try this patch, developed by Artem Prysyznuk.  We haven't
> incorporated it because we are doing extensive changes to camlp4
> to deal correctly with new-style locations.  Please let me know
> whether it works for you.

It works, but produces results that are slightly (but insignificantly) 
different from the ones that I get without camlp4. For example:

with camlp4:

> Raised by primitive operation at file "unify_mm.ml", line 1, character 20504
> Re-raised at file "unify_mm.ml", line 1, character 22067
> Called from file "unify_mm.ml", line 1, character 27263


> Fatal error: exception Out_of_memory
> Raised by primitive operation at file "unify_mm.ml", line 560, character 63
> Re-raised at file "unify_mm.ml", line 595, character 11
> Called from file "unify_mm.ml", line 707, character 76

Character 20504 in the file is indeed "line 560, character 63", but 
"character 22067" is not the same as "line 595, character 11".

the code in question is:

       else begin
          if ...

and non-camlp4 "line 595, character 11" one points to the space between 
"else" and "begin", while camlp4's "character 22067" points to the space 
right before the "if".

P.S. Why would an exception (supposedly raised inside the "true" branch 
of an if) be re-raised at the end of the "if" branch?

Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Jorgensen 70, tel: (626) 395-2907

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