caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jonathan Roewen" <jonathan.roewen@gmail.com>
To: "Matt Gushee" <matt@gushee.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] revised syntax and immediate objects
Date: Wed, 5 Jul 2006 11:07:46 +1200	[thread overview]
Message-ID: <ad8cfe7e0607041607u4a979ec2m967394218daa180c@mail.gmail.com> (raw)
In-Reply-To: <44AAF164.20406@gushee.net>

>  > I'd like to try make a camlp4 syntax extension that uses immediate
>  > objects,
>
> I've done that. I'll show you the key section of the code below, and I
> can send you the complete file if you like. It may not be 100% correct,
> but I've been using it in an application and so far it works. I don't
> know if I can *explain* it, though ... I wrote it several months ago,
> and I'm coming to think that CamlP4, like Perl, is a write-only language ;-)

Hmm, I'm getting an error trying to use class_str_item (ocaml 3.09.2):

# #use "topfind";;
# #camlp4o;;
# #require "camlp4.extend";;
# open Pcaml;;
# let gen_method loc field =
    let obj = "obj" in
    <:class_str_item< method $lid:field$ = $lid:obj$#$lid:field$; >>;;
Unbound quotation: "class_str_item";;

(The rhs of the expression is temporary, just for testing)

Also, I similarly get similar error for "class_expr".


  reply	other threads:[~2006-07-04 23:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04 21:43 Jonathan Roewen
2006-07-04 22:28 ` Martin Jambon
2006-07-04 22:53 ` Matt Gushee
2006-07-04 23:07   ` Jonathan Roewen [this message]
2006-07-04 23:20     ` Matt Gushee
2006-07-05  8:19   ` Nicolas Pouillard
2006-07-05  7:29 ` Nicolas Pouillard

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=ad8cfe7e0607041607u4a979ec2m967394218daa180c@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=matt@gushee.net \
    /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).