From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 483D57F860 for ; Thu, 20 Feb 2014 19:50:40 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.148.110; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of dra-news@metastack.com designates 62.13.148.110 as permitted sender) identity=mailfrom; client-ip=62.13.148.110; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@outmail148110.authsmtp.com) identity=helo; client-ip=62.13.148.110; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail148110.authsmtp.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoIBAJ9NBlM+DZRunGdsb2JhbABZgz6NSLQtFg4BAQEBAQgLCQkUKIIsCAIeEkwFFlIjHAEEHgWHeZ14sFKTIwSPKp5X X-IPAS-Result: AoIBAJ9NBlM+DZRunGdsb2JhbABZgz6NSLQtFg4BAQEBAQgLCQkUKIIsCAIeEkwFFlIjHAEEHgWHeZ14sFKTIwSPKp5X X-IronPort-AV: E=Sophos;i="4.97,513,1389740400"; d="scan'208";a="49850236" Received: from outmail148110.authsmtp.com ([62.13.148.110]) by mail3-smtp-sop.national.inria.fr with ESMTP; 20 Feb 2014 19:50:39 +0100 Received: from mail-c237.authsmtp.com (mail-c237.authsmtp.com [62.13.128.237]) by punt14.authsmtp.com (8.14.2/8.14.2) with ESMTP id s1KIoc6v086855 for ; Thu, 20 Feb 2014 18:50:38 GMT Received: from romulus.metastack.com (cpc1-cmbg5-0-0-cust241.5-4.cable.virginm.net [81.98.252.242]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s1KIoWxm034440 for ; Thu, 20 Feb 2014 18:50:32 GMT Received: from Altus ([172.16.0.151]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id s1KIoWba032403 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 20 Feb 2014 18:50:32 GMT From: "David Allsopp" To: "OCaml List" Date: Thu, 20 Feb 2014 18:52:20 -0000 Organization: MetaStack Solutions Ltd. Message-ID: <002201cf2e6c$e2696f60$a73c4e20$@metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac8ubB4TqwCYJphSR3uhcDQTDGn2xA== Content-Language: en-gb X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: e076e459-9a5f-11e3-94fa-002590a135d3 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNlEAUAAU NkdBMnJSNkcdTBdX QSgJW0siBQ9uW2N0 bxpQZQ9YYkBNXUti UVZASkxQEQd2AxgD GRwbTRk8NAQ9ASEX LRtiXXRfWEQ0dEd0 RwABFWoAMGNlYX0W AUUOagJVJQBXdxsT O01/VHEIaGVWZ3ll E1QlFDc3JilFISVT QwcCZVcPXU8BHzo9 WwFKGjtnB0AOQD8/ ZwA3MlMHVFkQLkV6 MF09VEgWOhQfEWUA X-Authentic-SMTP: 61633634383431.1024:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 81.98.252.242/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: [Caml-list] Constraining mutability of record types with interfaces Is there a profound reason that I'm missing (possibly to do with optimisations) why one can't have: Foo.mli type foo = {bar : unit} Foo.ml type foo = {mutable bar : unit} i.e. have field mutability being something which can be constrained by an interface in a sort of equivalent way to private types? I'm guessing, as the compiler goes to the trouble of explaining the exact error, that there is! David