caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Quotation issue with camlp4 printer
@ 2011-07-11 19:05 Petter Urkedal
  2011-07-12  9:17 ` xclerc
  0 siblings, 1 reply; 3+ messages in thread
From: Petter Urkedal @ 2011-07-11 19:05 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

The attached program prints out

    let x = """;;

when compiled with ocamlc and camlp4 version 3.12.0.  As you can see,
the string literal lacks an escape character.  I haven't tried version
3.12.1, but I didn't find anything about it in the release notes.  (To
reproduce:

    ocamlc.opt -c -I +camlp4 -pp camlp4orf -o quotation_bug.cmo quotation_bug.ml
    ocamlc.opt dynlink.cma -I +camlp4 camlp4lib.cma quotation_bug.cmo
-o quotation_bug.byte
    ./quotation_bug.byte
)

Petter

[-- Attachment #2: quotation_bug.ml --]
[-- Type: application/octet-stream, Size: 172 bytes --]

open Camlp4.PreCast
open Printf

let _loc = Loc.ghost

let () =
    let code = <:str_item< value x = "\"" >> in
    Printers.OCaml.print_implem code;
    print_string "\n"

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

* Re: [Caml-list] Quotation issue with camlp4 printer
  2011-07-11 19:05 [Caml-list] Quotation issue with camlp4 printer Petter Urkedal
@ 2011-07-12  9:17 ` xclerc
  2011-07-12 16:14   ` Petter Urkedal
  0 siblings, 1 reply; 3+ messages in thread
From: xclerc @ 2011-07-12  9:17 UTC (permalink / raw)
  To: caml users; +Cc: xclerc Clerc


Le 11 juil. 2011 à 21:05, Petter Urkedal a écrit :

> The attached program prints out
> 
>    let x = """;;
> 
> when compiled with ocamlc and camlp4 version 3.12.0.  As you can see,
> the string literal lacks an escape character.  I haven't tried version
> 3.12.1, but I didn't find anything about it in the release notes.  (To
> reproduce:
> 
>    ocamlc.opt -c -I +camlp4 -pp camlp4orf -o quotation_bug.cmo quotation_bug.ml
>    ocamlc.opt dynlink.cma -I +camlp4 camlp4lib.cma quotation_bug.cmo
> -o quotation_bug.byte
>    ./quotation_bug.byte
> )

The problem was also present in 3.12.1 and is now fixed in the SVN repository
in branch "version/3.12". Thanks for reporting the problem. Nevertheless I would
like to point out that you may also report it directly through the bugtracker (*).


Regards,

Xavier Clerc


(*) http://caml.inria.fr/mantis

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

* Re: [Caml-list] Quotation issue with camlp4 printer
  2011-07-12  9:17 ` xclerc
@ 2011-07-12 16:14   ` Petter Urkedal
  0 siblings, 0 replies; 3+ messages in thread
From: Petter Urkedal @ 2011-07-12 16:14 UTC (permalink / raw)
  To: caml users

On Tue, Jul 12, 2011 at 11:17 AM, xclerc <xavier.clerc@inria.fr> wrote:
> The problem was also present in 3.12.1 and is now fixed in the SVN repository
> in branch "version/3.12". Thanks for reporting the problem. Nevertheless I would
> like to point out that you may also report it directly through the bugtracker (*).

Thanks for the quick fix.  I'll use the bugtracker in the future;
didn't notice the list-signature.

Petter

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

end of thread, other threads:[~2011-07-12 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-11 19:05 [Caml-list] Quotation issue with camlp4 printer Petter Urkedal
2011-07-12  9:17 ` xclerc
2011-07-12 16:14   ` Petter Urkedal

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