Version française
Home     About     Download     Resources     Contact us    
Browse thread
Camlp4 quotations for tuples
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Philippe Veber <philippe.veber@g...>
Subject: Camlp4 quotations for tuples
Hi list,

Does someone know how to write a camlp4 quotation for types of the form 'a *
'b * 'c * 'd ...  For now I could only obtain types of the form 'a * ('b *
('c * ('d * ... )...))), using a code similar to


 List.fold_right
   (fun x accu -> <:ctyp< $x$ * $accu$ >>)
   (List.tl tuple_types)
   (List.hd tuple_types)


TIA,
ph.