English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
(old) camlp4 question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-11 (11:00)
From: Pietro Abate <Pietro.Abate@a...>
Subject: (old) camlp4 question
Hi all,
I want to write a type like this in camlp4 :
type ('a,'b) b = [ `T of 'b ]
type a = ('b,int) b as 'b

Suppose I have a list of ctyp [<:ctyp< 'b >>;<:ctyp< int >>; ... ]
How can I write the type ('b,int) b as 'b ??

I've tried with <:ctyp< type a = b ($list:l$) as 'b >> but the result
is incorrect ... what is the right syntax ?


++ Blog: http://blog.rsise.anu.edu.au/?q=pietro
++ "All great truths begin as blasphemies." -George Bernard Shaw
++ Please avoid sending me Word or PowerPoint attachments.
   See http://www.fsf.org/philosophy/no-word-attachments.html