Version française
Home     About     Download     Resources     Contact us    
Browse thread
problem with camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bruno De Fraine <Bruno.De.Fraine@v...>
Subject: Re: [Caml-list] problem with camlp4

On 03 Jul 2007, at 00:04, Benedikt Grundmann wrote:

> <:match_case< true -> $expr:num$ | $acc$ >>

Do you mean this?

<:match_case< true -> $int:string_of_int num$ >>

Also notice that you can write
<:expr< match $e$ with [ $list:l$ ] >>
where l is of type "Camlp4.PreCast.Ast.match_case list".

This can be easier than folding the expression with an accumulator.

Regards,
Bruno

--
Bruno De Fraine
Vrije Universiteit Brussel
Faculty of Applied Sciences, DINF - SSEL
Room 4K208, Pleinlaan 2, B-1050 Brussels
tel: +32 (0)2 629 29 75
fax: +32 (0)2 629 28 70
e-mail: Bruno.De.Fraine@vub.ac.be