From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id BAC7BBC69 for ; Tue, 31 Jul 2007 10:52:45 +0200 (CEST) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6V8qilN010915 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 31 Jul 2007 10:52:45 +0200 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1IFnT5-0000sT-00; Tue, 31 Jul 2007 09:52:39 +0100 Date: Tue, 31 Jul 2007 09:52:39 +0100 To: Brian Hurt Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: Void type? Message-ID: <20070731085239.GA3217@furbychan.cocan.org> References: <46AC748B.10200@lix.polytechnique.fr> <200707291216.34682.jon@ffconsultancy.com> <46AC7BB8.8050609@gmail.com> <20070729124340.GA18564@furbychan.cocan.org> <46AC8EEF.1040102@gmail.com> <20070729170216.GA8137@furbychan.cocan.org> <46ACF35F.5070102@lix.polytechnique.fr> <1185770437.11618.29.camel@rosella.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at discorde with ID 46AEF85C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; struct:01 markus:01 mottl's:01 markus:01 wrote:01 caml-list:01 seems:03 module:03 module:03 jul:05 brian:05 discussion:06 void:06 void:06 red:92 On Mon, Jul 30, 2007 at 07:13:21PM -0400, Brian Hurt wrote: > So how do I use that module and say, in the type system, "I will never > pass in a b"? This is where the void type comes in. I can declare: > > module Myreq = struct > type a = whatever;; > type b = void;; > end;; > > module Myexample = Example(Myreq);; Similar to Markus Mottl's practical example. [I'm so glad that we're getting practical uses out of this discussion ...] The question is, which void type definition do you use? type void or type void = { v: 'a. 'a } It seems to me that your example could use either. Markus uses the second definition, but I don't understand particularly why he couldn't use either. Rich. -- Richard Jones Red Hat