Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Caml4p... help
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pietro Abate <abate@d...>
Subject: Re: [Caml-list] Caml4p... help
thank you for you help... but I'm still missing something.

I want to produce a let statement. However my code produces 
something like that:
let _ = let pc = `Forall [|`Rule "a"; `Rule "b"; `Rule "c"|] in pc

that is not really helpful. I suppose the problem lays in the level
declaration (I used expr : LEVEL "top") or in the quotation iteself (I
used <:expr< let $lid:n$ = $s$ in $lid:n$>>).

I don't quite understand the quotation syntax. They are written in the
revised syntax, so they don't permit to write something like "let a =
10;;", but there are not "value" statement to declare a binding.

how can I transform my declaration 
str pc : [a;b;c];;
in something like that
let pc = `Forall [|`Rule "a"; `Rule "b"; `Rule "c"|];;
?

My final goal is to use camlp4 to simplify and extend the ocaml syntax
to write simple programs that I'll use to feed a virtual machine...

thanks,
p

On Tue, Oct 08, 2002 at 11:35:08PM -0400, jehenrik wrote:
> str pc : [a;b;c];;
> # - : _[> `Forall of _[> `Rule of string] array] =
> `Forall [|`Rule "a"; `Rule "b"; `Rule "c"|]


-- 
pgp key: 1024D/8A091922 2000-10-18 Pietro Abate <abate@arp.anu.edu.au>
Key fingerprint = 5111 D91B 5E0C 5CE6 FDA3  5EF4 6120 E18E 8A09 1922
public key avalaible via public key server at wwwkeys.eu.pgp.net
-------------------
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