From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CD169BB9C for ; Thu, 17 Nov 2005 02:46:08 +0100 (CET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jAH1k6aN010804 for ; Thu, 17 Nov 2005 02:46:07 +0100 Received: from localhost (orion [130.54.16.5]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id jAH1jxEn001560; Thu, 17 Nov 2005 10:46:00 +0900 (JST) Date: Thu, 17 Nov 2005 10:45:59 +0900 (JST) Message-Id: <20051117.104559.68536741.keiko@kurims.kyoto-u.ac.jp> To: garrigue@math.nagoya-u.ac.jp Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Recursive types From: Keiko Nakata In-Reply-To: <20051116.175512.27779356.garrigue@math.nagoya-u.ac.jp> References: <437AD616.7060006@inria.fr> <20051116.164048.68541720.keiko@kurims.kyoto-u.ac.jp> <20051116.175512.27779356.garrigue@math.nagoya-u.ac.jp> X-Mailer: Mew version 4.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 437BE0DE.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 recursive:01 checker:01 unification:01 memoizing:01 expansions:01 checker:01 variants:01 polymorphic:01 typing:01 jacques:01 tuple:02 types:02 types:02 garrigue:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 From: Jacques Garrigue > No need to memorize equivalences: s tuple expands at its head to s * s. > The type checker guarantees that it is always safe to expand the head > of a type (i.e., definitions are well-founded.) Thanks for the reply. > In order for unification to succeed above, t must expand to > (< m: 'a * 'a> as 'a), and s too. But to print nicely types we must > keep the abbreviations. This is done by memoizing expansions inside > the abbreviations themselves. This is a pretty nice feature of the type checker. When programming with polymorphic variants, the last part of typing error messages, which tells me incompatibilities of types using abbreviating names, always helps me a lot. With best regards, Keiko