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=1.0 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id BDCCBBC6C for ; Thu, 31 Jan 2008 20:52:05 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAADe1oUfAXQInh2dsb2JhbACQHwEBAQgKKZh5 X-IronPort-AV: E=Sophos;i="4.25,286,1199660400"; d="scan'208";a="8586936" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 31 Jan 2008 20:52:05 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m0VJq0CH030512 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 31 Jan 2008 20:52:05 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FAHi1oUfUTWUFZGdsb2JhbACQEQEYBAUIH5h8 X-IronPort-AV: E=Sophos;i="4.25,286,1199660400"; d="scan'208";a="7486827" Received: from mx1.wp.pl ([212.77.101.5]) by mail1-smtp-roc.national.inria.fr with ESMTP; 31 Jan 2008 20:52:00 +0100 Received: (wp-smtpd smtp.wp.pl 8273 invoked from network); 31 Jan 2008 20:51:57 +0100 Received: from phpdk6.ph.kcl.ac.uk (HELO [137.73.5.196]) (d0@[137.73.5.196]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with AES256-SHA encrypted SMTP for ; 31 Jan 2008 20:51:57 +0100 Message-ID: <47A226D7.6030108@wp.pl> Date: Thu, 31 Jan 2008 19:51:51 +0000 From: Dawid Toton User-Agent: Thunderbird 1.5.0.12 (X11/20071219) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Attach an invariant to a type References: <47a1cd167921b@wp.pl> <47A1D212.3010205@lri.fr> <1201802294.6154.56.camel@Blefuscu> <47A20FC1.5040103@lri.fr> <3a360f590801311113o4db1d660s206e7af4bcb3226@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 [cVMU] X-Miltered: at concorde with ID 47A226E0.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; integer:01 integer:01 caml-list:01 int:01 int:01 construct:02 module:03 let:03 constructing:04 guess:04 types:05 invariant:08 suppose:09 shouldn't:10 things:13 > I guess that making types like "int" private would require the system > (among other things) to decide whether you're using a given integer as > a Subindex.t or not. Suppose we have "type t = private int" in module Subindex. Is the following construct legal: let (a:Subindex.t) = 2 ? It shouldn't be - to prevent me from constructing values of this type. So I couldn't "use given integer as Subinddex.t".