From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pAO9E4gw013449 for ; Thu, 24 Nov 2011 10:14:04 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnABACQKzk7RVdU2kGdsb2JhbABEDqpVCCIBAQEBCQkNBxQEIYFyAQEBAwESAiYGATgBAwELAQUFNBI0AQUBHAY1h2MIl3sKjkmFCYkuAgUKiXVjBIgfjCuGcYZnPYFLgXRG X-IronPort-AV: E=Sophos;i="4.69,564,1315173600"; d="scan'208";a="120674936" Received: from mail-yw0-f54.google.com ([209.85.213.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Nov 2011 10:13:58 +0100 Received: by ywp17 with SMTP id 17so1261952ywp.27 for ; Thu, 24 Nov 2011 01:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=xluwh/jJ7xbVmqM71MxVOzmodHugFQsHjh/lsgMT9h8=; b=NnfC+Ky3gd9BFPu8kyHrm7nx7UA0UrezV6T8Pv+do/PT9wK+VHzHvJNLdCByoxhP/k 6nz7mdW8G6RET1sAUtQ3tvTXfaezbRMUvzWUCijMmODaV6VEOvcxwhG9s2RDqPVqUJAx +bFehsRNCvvwY5kCB4iLKZXeaHMAX8jJh9tTU= Received: by 10.50.100.194 with SMTP id fa2mr31783794igb.49.1322126037932; Thu, 24 Nov 2011 01:13:57 -0800 (PST) Received: from tet.garrigue.jp (58x158x128x157.ap58.ftth.ucom.ne.jp. [58.158.128.157]) by mx.google.com with ESMTPS id ft1sm47385340igc.3.2011.11.24.01.13.55 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Nov 2011 01:13:56 -0800 (PST) Sender: Jacques Garrigue Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Jacques Garrigue In-Reply-To: <20111111.165707.71105223.garrigue@math.nagoya-u.ac.jp> Date: Thu, 24 Nov 2011 18:13:53 +0900 Cc: caml-list@inria.fr Message-Id: <07914DBD-682A-4EB5-8700-0F009CA30795@math.nagoya-u.ac.jp> References: <20111111.165707.71105223.garrigue@math.nagoya-u.ac.jp> To: Jacques Garrigue X-Mailer: Apple Mail (2.1084) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id pAO9E4gw013449 Subject: [Caml-list] Re: New GADT iteration The new branch has now been merged in trunk, all ready for the next version of OCaml. http://caml.inria.fr/cgi-bin/viewcvs.cgi/ocaml/trunk Big thanks to Jeremy Yallop for finding many bugs. But you still have your chance to find more :-) Jacques Garrigue On 2011/11/11, at 16:57, Jacques Garrigue wrote: > Dear Camlers, > > Some of you may already be aware that GADTs are available in trunk, > since this summer. Information is available here: > https://sites.google.com/site/ocamlgadt/ > > As you can see in the presentation, this first iteration had some > limitations (particularly it was mostly incompatible with objects and > polymorphic variants), which led us to try a new approach. > > In this new iteration it is guaranteed that an ambiguous type cannot > escape the scope of a GADT pattern-matching, which leads to > (hopefully) more intuitive type inference, and allows to combine GADTs > with objects and polymorphic variants. The syntax is unchanged. > > As this approach depends crucially on the above property of ambiguous > types not escaping, it requires as much testing as possible. > This is why I would like to invite interested people to test it and > report strange behavior. > The new code is in the branch branches/gadts-devel, or > http://caml.inria.fr/cgi-bin/viewcvs.cgi/ocaml/branches/gadts-devel/ > > Sample code is available in the subdirectory testsuite/tests/typing-gadts. > It includes Alain Frisch's example for safe type introspection, > extended with variants. > > Please tell me if you find some unsoundness, or you cannot understand > why you get an error. > > Jacques Garrigue