caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: blue storm <bluestorm.dylc@gmail.com>
To: Jacques Le Normand <rathereasy@gmail.com>
Cc: caml-list caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] defining recursive types with camlp4
Date: Mon, 15 Jun 2009 00:11:11 +0200	[thread overview]
Message-ID: <527cf6bc0906141511g7c978432ie0813a55d1e07a45@mail.gmail.com> (raw)
In-Reply-To: <f74178430906141410y4327d84r7223cb87bdc83e38@mail.gmail.com>

On Sun, Jun 14, 2009 at 11:10 PM, Jacques Le
Normand<rathereasy@gmail.com> wrote:
> how would I go about writing such a function?

The "... and ..." multiple-declaration isn't at the str_item level but
at the ctyp level. You should use <:ctyp< $..$ and $...$ >>. Moreover,
it appears that the type declaration node in the AST (Ast.TyDcl) does
not have a quotation syntax : <:str_item< type $..$ = $...$ >> won't
work.

  let type_chain _loc  lst =
    let decl (name, constructors) = Ast.TyDcl(_loc, name, [],
constructors, []) in
    <:str_item< type $Ast.tyAnd_of_list (List.map decl lst)$ >>


      reply	other threads:[~2009-06-14 22:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-14 21:10 Jacques Le Normand
2009-06-14 22:11 ` blue storm [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=527cf6bc0906141511g7c978432ie0813a55d1e07a45@mail.gmail.com \
    --to=bluestorm.dylc@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=rathereasy@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).