From: Petter Urkedal <paurkedal@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] Quotation issue with camlp4 printer
Date: Mon, 11 Jul 2011 21:05:54 +0200 [thread overview]
Message-ID: <CALa9pHT0UbkN9nCXNnZ=Xc-az=cw1Rz=ywBF+XT+YpJ+SQLcbA@mail.gmail.com> (raw)
[-- 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"
next reply other threads:[~2011-07-11 19:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-11 19:05 Petter Urkedal [this message]
2011-07-12 9:17 ` xclerc
2011-07-12 16:14 ` Petter Urkedal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALa9pHT0UbkN9nCXNnZ=Xc-az=cw1Rz=ywBF+XT+YpJ+SQLcbA@mail.gmail.com' \
--to=paurkedal@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox