From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA21785; Fri, 8 Nov 2002 16:26:04 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA22125 for ; Fri, 8 Nov 2002 16:26:03 +0100 (MET) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gA8FQ3D28544 for ; Fri, 8 Nov 2002 16:26:03 +0100 (MET) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id gA8FQ2B48190 ; Fri, 8 Nov 2002 16:26:02 +0100 (CET) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.12.3/jb-1.1) id gA8FQ0ll026145 ; Fri, 8 Nov 2002 16:26:01 +0100 (MET) Date: Fri, 8 Nov 2002 16:26:00 +0100 (MET) From: Alain Frisch To: Jacques Garrigue cc: Caml list Subject: Re: [Caml-list] dynamic runtime cast in Ocaml In-Reply-To: <20021107162220A.garrigue@kurims.kyoto-u.ac.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 = 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