Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Q: Correct locations for macro camlp4 extensions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jan Kybic <kybic@f...>
Subject: [Caml-list] Q: Correct locations for macro camlp4 extensions
        I quite like some of the OCaml syntax extensions implemented
with campl4 that I gathered so far, for example: (enhanced macros, IFDEF, etc.)

    "where" keyword (enabling you to write 'let x = f 3 where f = ...')

    operator composition (like "$" in Haskell)

    "repeat"/"until" loop

    "for" loop (like in C), as in "for c 0 (c<10) (c+2) do"

They come from Caml Hump, camlp4 tutorial, Usenet articles and WWW
searches. The problem with them is that the line numbers are lost, 
which is a problem for error and assert messages, I get thinks like
Assert_failure("", 1, 4798) instead of correct 
Assert_failure("", 155, 4)

I am not a camlp4 expert, so I would like to ask if there versions of
the above mentioned extensions that make caml (3.07) generate correct
line numbers. Has the problem been discussed, is there any workaround?

Thank you very much for all pointers,


Jan Kybic <>                  tel. +420 2 2435 7264
       or <>,

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: