caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Patches for #line directives?
@ 1997-07-09 14:26 Paul Stodghill
  1997-07-10  7:29 ` Patches for ?line directives? Olivier Montanuy
  1997-07-10 13:40 ` Patches for #line directives? Xavier Leroy
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Stodghill @ 1997-07-09 14:26 UTC (permalink / raw)
  To: caml-list

Are there any patches floating around to make Caml-light and/or O'Caml
support the #line directive? In particular, I'm using noweb to generate
some Caml code, and I would like the debugger to point me back to the
original .nw source file.

Thanks for your help, and sorry for the english-only posting.

-- 
Paul Stodghill <stodghil@cs.cornell.edu>
http://www.cs.cornell.edu/home/stodghil/home.html





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patches for ?line directives?
  1997-07-09 14:26 Patches for #line directives? Paul Stodghill
@ 1997-07-10  7:29 ` Olivier Montanuy
  1997-07-10 13:40 ` Patches for #line directives? Xavier Leroy
  1 sibling, 0 replies; 3+ messages in thread
From: Olivier Montanuy @ 1997-07-10  7:29 UTC (permalink / raw)
  To: caml-list

Paul Stodghill wrote:
> 
> Are there any patches floating around to make Caml-light and/or O'Caml
> support the #line directive? In particular, I'm using noweb to
>...

Pierre Cregut told me to add this to the Makefile:

.nwm.ml:
        notangle -Rml -L'# %L "%F"%N' $*.nwm | cpif $*.ml
.nwm.mli:
        notangle -Rmli  -L'# %L "%F"%N' $*.nwm | cpif $*.mli

It works fine, but then forget about reading the .ml or .mli files,
because those #line make them real ugly.

-- 
Olivier Montanuy  FT/CNET/DES/GRL
montanuy@lannion.cnet.fr





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patches for #line directives?
  1997-07-09 14:26 Patches for #line directives? Paul Stodghill
  1997-07-10  7:29 ` Patches for ?line directives? Olivier Montanuy
@ 1997-07-10 13:40 ` Xavier Leroy
  1 sibling, 0 replies; 3+ messages in thread
From: Xavier Leroy @ 1997-07-10 13:40 UTC (permalink / raw)
  To: Paul Stodghill; +Cc: caml-list

> Are there any patches floating around to make Caml-light and/or O'Caml
> support the #line directive?

The latest release of Objective Caml (1.05) supports the

        # linenum "filename"

directive (same format as the directives emitted by the C
preprocessor). It has not been tested extensively yet, but if it works
well and there is interest, we might fold it back into Caml Light later.

> In particular, I'm using noweb to generate
> some Caml code, and I would like the debugger to point me back to the
> original .nw source file.

This should work pretty well as long as you're careful about copying
whole lines from the .nw file to the generated .ml file.

Regards,

- Xavier Leroy





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-07-11 19:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-09 14:26 Patches for #line directives? Paul Stodghill
1997-07-10  7:29 ` Patches for ?line directives? Olivier Montanuy
1997-07-10 13:40 ` Patches for #line directives? Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).