[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Pietro Abate <Pietro.Abate@a...> |
| Subject: | [Caml-list] camlp4 question... |
Hi all,
I'd like to write a small extension to transform
let f <a;b;c> = ...
in
let f new_id =
match new_id with
|[a;b;c] -> ...
|_ -> failwith "wrong arguments"
I've tried with something like:
expr: LEVEL "simple"
[[
"let"; OPT "rec"; "<"; l = LIST1 LIDENT; ">"; $list:pel$ "in" e = expr ->
<:expr< let .... = function [] -> failwith "ffff" | $list:l$ -> $e$ >>
]];
but I'm stuck... In particular, how can I parse $list:pel$ ?
pel = LIST patt ?
thanks,
p
--
++ "All great truths begin as blasphemies." -George Bernard Shaw
++ Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners