From: echinuz echinuz <echinuz@yahoo.com>
To: caml-list@inria.fr
Subject: Difference in Quotation Behavior for str_items Between Revised and Original Syntax
Date: Sun, 25 Nov 2007 10:20:40 -0800 (PST) [thread overview]
Message-ID: <591732.83934.qm@web60120.mail.yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 954 bytes --]
Hi,
Consider the following two programs:
----------------------------------------------------------
$ cat junk.ml
let _=fun x ->
match x with
| <:str_item< $exp:e$ >> -> ()
| _ -> ()
;;
$ camlp4of ./junk.ml
fun x ->
match x with
| Ast.StSem (_, (Ast.StExp (_, e)), (Ast.StNil _)) -> ()
| _ -> ()
----------------------------------------------------------
and
----------------------------------------------------------
$ cat junk_r.ml
value _=fun x ->
match x with
[ <:str_item< $exp:e$ >> -> ()
| _ -> ()]
;
$ camlp4rf ./junk_r.ml
let _ x = match x with | Ast.StExp (_, e) -> () | _ -> ()
----------------------------------------------------------
Why does the second program expand to Ast.StExp while the first expands to Ast.StSem? I would like, and expect, the first case to expand to Ast.StExp and not Ast.StSem.
---------------------------------
Never miss a thing. Make Yahoo your homepage.
[-- Attachment #2: Type: text/html, Size: 1308 bytes --]
reply other threads:[~2007-11-25 18:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=591732.83934.qm@web60120.mail.yahoo.com \
--to=echinuz@yahoo.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