Version française
Home     About     Download     Resources     Contact us    
Browse thread
camlp4o and lazy: pr_o: not impl: expr; tag = 19
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Beck01, Wolfgang <BeckW@t...>
Subject: camlp4o and lazy: pr_o: not impl: expr; tag = 19
During the holidays I tried to get finally a clue about camlp4.

When I have a small grammar like this:

open Pcaml
EXTEND
	expr:
	[ [
		"bla" ->
			let fe = <:expr< tst() >>
			in
			let lzy = <;expr< lazy $fe$ >>
			in
			<:expr< do_something $lzy$ >>
	] ]
	;
END

and compile it to g3.cmo with

	ocamlc -pp "camlp4o pa_extend.cmo q_MLast.cmo" -I +camlp4 -c g3.ml

and pass a file containing a bla through

	camlp4o ./g3.cmo pr_o.cmo bla.ml

I get
	let _ = do_something<pr_o: not impl: expr; tag = 19>

There seems to be an issue with <:expr< lazy ... When I replace
'lazy' with 'lazi' everything works as expected:

	let _ = do_someting (lazi (tst ()))

Any idea what's wrong here?


Wolfgang
--
T-Systems International GmbH
Technologiezentrum
Next Generation IP Services and Systems
+49 6151 9372863
Am Kavalleriesand 3
64295 Darmstadt