From: Samuel Lacas <Samuel.Lacas@trusted-logic.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] implementing the visitor pattern in ocaml
Date: Tue, 14 Oct 2003 12:13:24 +0200 [thread overview]
Message-ID: <20031014121324.D22981@ouessant.trusted-logic.fr> (raw)
In-Reply-To: <20031014091112.GB26517@imperium.ph>
Hi, you need to use coercions here (at least, that's the way it works
with me). Simply declare
method accept (v : abstractvisitor) = v#visit_foo(self :> foo)
in class foo.
Have a look at section 3.11 of the manual for more information.
Hope this helps,
sL
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2003-10-14 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-14 9:11 Rafael 'Dido' Sevilla
2003-10-14 10:13 ` Samuel Lacas [this message]
2003-10-14 15:18 ` Didier Remy
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=20031014121324.D22981@ouessant.trusted-logic.fr \
--to=samuel.lacas@trusted-logic.fr \
--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