Browse thread
[Caml-list] possible camlp4 problem/bug with literal booleans in expr quotations.
- Maas-Maarten Zeeman
[
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: | Maas-Maarten Zeeman <maas@w...> |
| Subject: | [Caml-list] possible camlp4 problem/bug with literal booleans in expr quotations. |
Hi,
I'm experimenting with camlp4 and found this problem.
file: forever.ml
#load "q_MLast.cmo";;
#load "pa_extend.cmo";;
open Pcaml;;
EXTEND
expr: LEVEL "expr1"
[ [ "forever"; body=expr ->
<:expr< while true do { $body$ } >> ] ];
END;;
file: bar.ml
let _ = forever print_string "0";
compilation:
$ ocamlc -pp camlp4o -I +camlp4 -c forever.ml
$ ocamlc -pp "camlp4o ./forever.cmo" bar.ml
File "bar.ml", line 1, characters 8-33:
Unbound value true
But when you substitute 1=1 for true this works as expected. Can true
not be used as literal in expr quotations?
Thanks,
Maas
-------------------
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