[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Pietro Abate <Pietro.Abate@a...> |
| Subject: | Re: [Caml-list] (old) camlp4 question |
On Wed, Apr 11, 2007 at 01:43:48PM +0200, Nicolas Pouillard wrote:
> Two things:
> The `as' must be surrounded by parentheses (('b,int) b as 'b).
> And a type declaration is not a type, you can use a str_item or a sig_item.
> Here we go: <:str_item< type a = (b ($list:l$) as 'b) >>;;
Doesn't quite work for me... This is my usage pattern.
I've a toplevel <:str_item< type $list:l$ >> where l is a list of
((_loc * string),(string * (bool * bool)) list, ctyp ,?? list)
and ?? list is a list of something that I haven't figure out yet (the
manual says <:str_item< type $list:sslt$ >>: type declaration).
to write type a = (b ($list:l$) as 'b) , I've to give a list l
of one element as
((_loc,"a"),[], <:ctyp< (b ($list:[<:ctyp< 'b >>,<:ctyp< int >>]$) as 'b) >>, [])
My problem is to write the type (('b,int) b as 'b) as a ctyp .
I want to write it in this way as both l and the list of type variables
in (('b,int) b as 'b) are not fixed. Moreover types in <:str_item<
type $list:l$ >> can be mutually recursive.
thanks :)
p
--
++ 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