From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: "Pietro Abate" <Pietro.Abate@anu.edu.au>,
"ocaml ml" <caml-list@inria.fr>
Subject: Re: [Caml-list] (old) camlp4 question
Date: Thu, 12 Apr 2007 09:06:22 +0200 [thread overview]
Message-ID: <cd67f63a0704120006lf5400f3s155d0fd4d1ec714e@mail.gmail.com> (raw)
In-Reply-To: <20070412012049.GA23847@pulp.rsise.anu.edu.au>
On 4/12/07, Pietro Abate <Pietro.Abate@anu.edu.au> wrote:
> 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).
?? is for constraints on type parameters (you can leave it empty)
> 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 .
Hum I see it's the type application that is like any other application
in revised.
int list -> list int
(string, int) table -> table string int
<:ctyp< (b 'b int as 'b) >>
Regards,
--
Nicolas Pouillard
prev parent reply other threads:[~2007-04-12 7:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-11 10:59 Pietro Abate
2007-04-11 11:43 ` [Caml-list] " Nicolas Pouillard
2007-04-12 1:20 ` Pietro Abate
2007-04-12 7:06 ` Nicolas Pouillard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd67f63a0704120006lf5400f3s155d0fd4d1ec714e@mail.gmail.com \
--to=nicolas.pouillard@gmail.com \
--cc=Pietro.Abate@anu.edu.au \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox