From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: Chris Hecker <checker@d6.com>
Cc: caml-list@inria.fr
Subject: Re: status of some big "important" features?
Date: Sat, 30 Dec 2000 21:53:03 +0100 [thread overview]
Message-ID: <20001230215303.A2040@verdot.inria.fr> (raw)
In-Reply-To: <4.3.2.7.2.20001230112049.00ba2b60@shell16.ba.best.com>; from checker@d6.com on Sat, Dec 30, 2000 at 11:30:57AM -0800
Hi,
On Sat, Dec 30, 2000 at 11:30:57AM -0800, Chris Hecker wrote:
> type foo = {bar:float; baz:int };;
> let a = {bar = 1.;baz = 1};;
> print_members_camlp4 a;;
>
> Where print_members_camlp4 is hooked by camlp4 to iterate over the
> members of whatever record was passed to it (or error at compile
> time if it's not a record)? That's not possible?
Camlp4 does not know what a type definition is: for it, it is just a
syntax thing. Therefore, in the line "print_member_camlp4 a", Camlp4
does not know what "a" is: for it, it is just "the identifier a",
that's all. The fact that it is a variable previously defined of type
"foo" is typing. If you want to treat that at Camlp4 time, you have to
write a types inference algorithm. A compiler...
--
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
next prev parent reply other threads:[~2000-12-30 21:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-26 23:47 Chris Hecker
2000-12-28 9:10 ` Daniel de Rauglaudre
2000-12-30 19:30 ` Chris Hecker
2000-12-30 20:53 ` Daniel de Rauglaudre [this message]
2000-12-31 1:58 ` Chris Hecker
2000-12-31 3:08 ` Daniel de Rauglaudre
2001-01-02 17:39 ` William Chesters
2000-12-31 20:39 ` John Max Skaller
2000-12-28 20:19 ` A proposal for overloading Christophe Raffalli
2001-01-02 10:38 ` Didier Remy
2001-01-02 19:08 ` Christophe Raffalli
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=20001230215303.A2040@verdot.inria.fr \
--to=daniel.de_rauglaudre@inria.fr \
--cc=caml-list@inria.fr \
--cc=checker@d6.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