From: Martin Jambon <martin_jambon@emailuser.net>
To: Marc Lasson <titmarc@free.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] OO syntax extension
Date: Thu, 14 Jul 2005 21:10:23 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0507142105130.1655-100000@localhost> (raw)
In-Reply-To: <42D71430.5030601@free.fr>
On Fri, 15 Jul 2005, Marc Lasson wrote:
> Jacques Garrigue wrote:
>
> >OO syntax extension
> > Some camlp4 syntax extensions to write more compact code using
> > objects. The new syntaxes are
> > * val [mutable] x = expr with (reader|writer|accessor)
> > generates code for an x and a set_x method, like in ruby.
> > * obj#x <- expr
> > generates a call to the set_x method.
> > * {| [mutable] f1 = expr1; ...; [mutable] fn = exprn |}
> > generates an immediate object with the above fields and the
> > corresponding accessor methods. You may also include inherit
> > declarations.
> >
> I am very interested in your OO syntax extension but i did not succeed
> to compile it.
> I get the following error:
>
> marc@georgie:~$ ocamlc -I +camlp4 -c -pp 'camlp4o pa_extend.cmo
> q_MLast.cmo' pa_oo.ml
> File "pa_oo.ml", line 12, characters -249--249:
> Unbound value loc
>
> The error's position looks very weird. Since i can't speak camlp4, i'm
> unable to fix it.
Pass the -loc _loc option to camlp4o and it should work.
See http://martin.jambon.free.fr/extend-ocaml-syntax.html#loc
Martin
--
Martin Jambon, PhD
http://martin.jambon.free.fr
prev parent reply other threads:[~2005-07-15 4:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-09 3:59 Polymorphic map and " Jacques Garrigue
2005-07-15 1:41 ` [Caml-list] " Marc Lasson
2005-07-15 2:40 ` Jacques Garrigue
2005-07-15 4:10 ` Martin Jambon [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=Pine.LNX.4.44.0507142105130.1655-100000@localhost \
--to=martin_jambon@emailuser.net \
--cc=caml-list@inria.fr \
--cc=titmarc@free.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