caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain Frisch <frisch@clipper.ens.fr>
To: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
Cc: Caml list <caml-list@inria.fr>
Subject: Re: [Caml-list] dynamic runtime cast in Ocaml
Date: Fri, 8 Nov 2002 16:26:00 +0100 (MET)	[thread overview]
Message-ID: <Pine.SOL.4.44.0211081601540.17321-100000@clipper.ens.fr> (raw)
In-Reply-To: <20021107162220A.garrigue@kurims.kyoto-u.ac.jp>

On Thu, 7 Nov 2002, Jacques Garrigue wrote:

> By the way, for the expressivity addict (Curry-style), there is now a
> branch in CVS with support for a specific form of dependent types.

Nice !  Do you have specific cases of application in mind ?
It's amazing to see how Caml succeed in escaping ML jail (rows, HO
polymorphism, etc...).

> I plan to provide it as a patch after the next release.

Any long-term plan for inclusion in OCaml ?

I guess that backtracking unification could benefit to OCaml in other
places (e.g.:undoing the effect of typing an ill-typed expression in the
toplevel).


> and this without any overloading...

Well, you could also say that this is a lightweight solution for
overloading ...


Let's play a little bit ...

# fun x -> multimatch x with (a, `A x) -> (a,x) | (a, `B y) -> a + y;;
This expression has type int but is here used with type int * 'a

Mmm, need to rewrite it this way:

# fun x -> match x with (a, z) -> multimatch z with `A -> (a,x) | `B y -> a + y;;
- : (int * [< `A & 'b = int * 'a | `B of int & 'b = int] as 'a) -> 'b = <fun>


Do you have any paper/doc describing multimatch typing ?


-- Alain

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


  parent reply	other threads:[~2002-11-08 15:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-06 11:53 Basile STARYNKEVITCH
2002-11-06 12:54 ` Xavier Leroy
2002-11-07  2:01   ` Michael Vanier
2002-11-07  8:11     ` Jacques Garrigue
2002-11-07  3:28   ` Walid Taha
2002-11-07  7:22     ` Jacques Garrigue
2002-11-07 14:49       ` Walid Taha
2002-11-08 15:26       ` Alain Frisch [this message]
2002-11-11  9:26         ` Jacques Garrigue

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.SOL.4.44.0211081601540.17321-100000@clipper.ens.fr \
    --to=frisch@clipper.ens.fr \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /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).