<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/07/8d172d820e65f0b1a595f47107efe83b"
  from="Olivier Ricordeau &lt;olivier.ricordeau@w...&gt;"
  author="Olivier Ricordeau"
  date="2003-07-22T16:26:59"
  subject="Re: [Caml-list] match on dynamic type"
  prev="2003/07/f4f0c2155e99d8e24366c19287802309"
  next="2003/07/2d76bfee0b5a11a7db9f49191f910099"
  prev-in-thread="2003/07/f4f0c2155e99d8e24366c19287802309"
  next-in-thread="2003/07/2d76bfee0b5a11a7db9f49191f910099"
  prev-thread="2003/07/efc650f6736621d6f758bb8de52b1496"
  next-thread="2003/07/7347ef3d79f516ef8692babe85c8791a"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] match on dynamic type">
<msg 
  url="2003/07/f4f0c2155e99d8e24366c19287802309"
  from="Olivier Ricordeau &lt;olivier.ricordeau@w...&gt;"
  author="Olivier Ricordeau"
  date="2003-07-22T15:52:09"
  subject="[Caml-list] match on dynamic type">
<msg 
  url="2003/07/8d172d820e65f0b1a595f47107efe83b"
  from="Olivier Ricordeau &lt;olivier.ricordeau@w...&gt;"
  author="Olivier Ricordeau"
  date="2003-07-22T16:26:59"
  subject="Re: [Caml-list] match on dynamic type">
<msg 
  url="2003/07/2d76bfee0b5a11a7db9f49191f910099"
  from="Olivier Ricordeau &lt;olivier.ricordeau@w...&gt;"
  author="Olivier Ricordeau"
  date="2003-07-22T17:45:32"
  subject="Re: [Caml-list] match on dynamic type">
</msg>
</msg>
</msg>
</thread>

<contents>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Olivier Ricordeau wrote:
&gt; Hi!
&gt;
&gt; I'd like to know how I can make a match on an object's dynamic type. Let
&gt; a be an abstract class. Let b and c be two class which inherit from a.
&gt; I'd like to write a method which looks like this:
&gt;
&gt; method foo (bar : a) =
&gt;     match "a's dynamic type" with

I meant:
      match "bar's dynamic type" with

&gt;        b -&gt; do_something()
&gt;      | c -&gt; do_something_else()

- --
- -= *Olivier RICORDEAU* =-        http://freefolks.org
          &lt; LibNN addict http://libnn.org &gt;
lynx -source http://freefolks.org/key.asc | gpg --import
olivier.ricordeau@wanadoo.fr _Might the source be with you_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/HWXPDFRYKP6DJEwRAs9oAJ42L0dNszbpvs9GF8wLsIavyMciSwCfcgMe
R0ji03fHPE/Xt1hkymNRwdE=
=qXKi
-----END PGP SIGNATURE-----

-------------------
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

</contents>

</message>

