From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5B531BB81 for ; Wed, 7 Dec 2005 00:29:39 +0100 (CET) Received: from rabbit.math.nagoya-u.ac.jp (rabbit.math.nagoya-u.ac.jp [133.6.130.5]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jB6NTbhq004011 for ; Wed, 7 Dec 2005 00:29:38 +0100 Received: from localhost (millas [172.16.30.29]) by rabbit.math.nagoya-u.ac.jp (8.12.11/3.7W) with ESMTP id jB6NTT6P026271; Wed, 7 Dec 2005 08:29:29 +0900 (JST) Date: Wed, 07 Dec 2005 08:27:47 +0900 (JST) Message-Id: <20051207.082747.205306140.garrigue@math.nagoya-u.ac.jp> To: dmcclain1@mindspring.com Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Module Abbreviations in MLI Files From: Jacques Garrigue In-Reply-To: <00fd01c5fa92$ae4bf570$0201000a@dylan> References: <00fd01c5fa92$ae4bf570$0201000a@dylan> X-Mailer: Mew version 4.0.69 on Emacs 22.0.50 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 43961EE1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 mli:01 ocaml:01 syntax:01 mli:01 defines:01 sig:01 sig:01 define:01 jacques:01 jacques:01 types:02 types:02 garrigue:03 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: "David McClain" > I'm a bit rusty writing raw OCaml from scratch, and I ran into syntax errors > this morning whenever I tried to use Module abbreviations, such as > > module T = Types > > in my MLI files. These work just fine in ML files. > > What is the reason for preventing type abbreviations in the interface spec? There is no such thing as "module abbreviations". The above is a module definition: it defines a module T, with the same contents as module Types. A module is a value, and you cannot define values in a signature, only declare them. If you have a signature Types_sig for Types, you might write module T : Types_sig but then you would have to include an implementation in the module. Jacques