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 7CBA77F616 for ; Wed, 22 Feb 2017 19:54:53 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=virgile.prevosto@gmail.com; spf=Pass smtp.mailfrom=virgile.prevosto@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f65.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of virgile.prevosto@gmail.com) identity=pra; client-ip=74.125.82.65; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="virgile.prevosto@gmail.com"; x-sender="virgile.prevosto@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of virgile.prevosto@gmail.com designates 74.125.82.65 as permitted sender) identity=mailfrom; client-ip=74.125.82.65; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="virgile.prevosto@gmail.com"; x-sender="virgile.prevosto@gmail.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@mail-wm0-f65.google.com) identity=helo; client-ip=74.125.82.65; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="virgile.prevosto@gmail.com"; x-sender="postmaster@mail-wm0-f65.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AcyVX8hLIeLnlcUZJ7NmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgRLv7xwZ3uMQTl6Ol3ixeRBMOAuq8C0rSd6vm+EUU7or+5+EgYd5JNUxJXwe?= =?us-ascii?q?43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRp?= =?us-ascii?q?OOv1BpTSj8Oq3Oyu5pHfeQtFiT69bL9oMRm7rArdutQLjYZjN6081gbHrnxUdu?= =?us-ascii?q?pM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTY?= =?us-ascii?q?QguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhS?= =?us-ascii?q?EaPDA77W7XkNR9gqJVrhyiuhJx3ZLbbZqJNPZiZK7RYc8WSXZDU8tXSidPApm8?= =?us-ascii?q?b4wKD+cZMulYrpP9p1QPrRu6GwanGfnhyiVWiX/o2q06yPghEQbb1wEnAdIOsW?= =?us-ascii?q?7UrNr0NKcWT++51rHIzS/dYPNI3jf985TIchc6rPGJUr9xftDdyU41FwPKl1id?= =?us-ascii?q?r5HuMTCN1ukVsWWW4PBsWf+xh2MnsQ18oSajyt0th4TJgI8e10rK+j9jwIkvIN?= =?us-ascii?q?21UE57bsCgEJtXryyaMpF5QsImQ21xtic6z6EKtYe1fCULyJkr3RHfa/uAc4iH?= =?us-ascii?q?5hLsSvydLit/hHJgYL6/hhCy/la8yuDkVMS530xGojdbntTMrHwA1ALf5tKGR/?= =?us-ascii?q?Z95kuh3CyA1wHX6uFKO0A0kq/bJoY/wr4xjJoTvkXDHivol0nslK+WbFsr+vav?= =?us-ascii?q?6+T8frXmoYSRN4Bxig7kM6QuntazDvg/MggLR2Sb4/iz1KX//U3lR7VHluE5nb?= =?us-ascii?q?PcsJDePMgboq+5AxRJ0os48Ba+DzKm0MwCknUdLVJFfgiHj4nzNF3ULvD4F6T3?= =?us-ascii?q?v1P5txxC4tSOarboB5GIKnnYjJ/ge6x84ghS0lxg48pY4sdqC6sOIfb+Enfruc?= =?us-ascii?q?LfFQM+e1iqwvzoCdFwkJsEVHyIGbOeGKaOoRmP/O15cLrEX5McpDuoc6tt3PXp?= =?us-ascii?q?l3JswVI=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DTAgAX3q1Yf0FSfUpeHgYMGQYMg0g/g?= =?us-ascii?q?QkHg1SzRYkCB0MUAQEBAQEBAQEBAQESAQEJCwsKGzGCMyCCRwQZATkDDQUQDwI?= =?us-ascii?q?mAiQSAQUBIolwAxWfKYNDP4wDgWw6gwkFhAgnDYQUAgYSeYVBjEmCXwWJI4dzi?= =?us-ascii?q?nqCAoRyiy+CTo5CkV4UHoEVNoEhNSxGFwWCVoEJAQsBGRuCDj81ihQBAQE?= X-IPAS-Result: =?us-ascii?q?A0DTAgAX3q1Yf0FSfUpeHgYMGQYMg0g/gQkHg1SzRYkCB0M?= =?us-ascii?q?UAQEBAQEBAQEBAQESAQEJCwsKGzGCMyCCRwQZATkDDQUQDwImAiQSAQUBIolwA?= =?us-ascii?q?xWfKYNDP4wDgWw6gwkFhAgnDYQUAgYSeYVBjEmCXwWJI4dzinqCAoRyiy+CTo5?= =?us-ascii?q?CkV4UHoEVNoEhNSxGFwWCVoEJAQsBGRuCDj81ihQBAQE?= X-IronPort-AV: E=Sophos;i="5.35,195,1484002800"; d="scan'208";a="214395204" Received: from mail-wm0-f65.google.com ([74.125.82.65]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 22 Feb 2017 19:54:32 +0100 Received: by mail-wm0-f65.google.com with SMTP id v77so1935652wmv.0 for ; Wed, 22 Feb 2017 10:54:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=DLD1tpxB36jmonAo83CupnhBgXHbFjUQIdNoIeE5vNo=; b=KU0ZEhmztkndkhVtAT2hnBFse9J1Y71gv0OLQ/uGNUkrnUzEqS3rPoNX/+ij2JeUmg DepID96pq5ZCjqqlU6ApWtNPFY2Kz/4oZChE/Ytr6p/+yrohe0hly33Iry9lCKC4Wj1g 2EALbe5ZdUvU59wKXuOsXlMNVsOm1NS14pIBg+vNmjb1h7oT+llVmgV7/K5FG8lCCd98 qvYwiVzwVUhZCMovVEn3xzprkQmpNAZQ7sHjpL1pBdj7AhfbD51Pl5NjHDtsb9w/4b1N ruVSARHH311UcuICL/4OZcYFiPwzRw/a8e0T01UZPwcF5+wg07wfm1L8uMMoGKtVEmkE F0Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=DLD1tpxB36jmonAo83CupnhBgXHbFjUQIdNoIeE5vNo=; b=eHxi2LT4BX8kdLvAbEwpxFBqANiZlWB7nbwAqiT8stU5+pj7n1e/aXU29/SV/XAYHF v8W+mCuelrRjecXQCCBdxZZfW2t9vlJ0dHp4On808vGuyx+owXfiDnYUKcgGPLU9M+IH ZvchqrtHsT1ycRLGRfAAMChdd2Oqo3mjecVJ26BM/S8iXjR0T1RNrXLvWhLEK7H5kIM7 F2GJuk+pp3lDNIE8qaX7/mj5vPZBcW0djY+3UiqgmwEy3eVSr79domG/2cc+HTVQu+Tz Is8wmCSwUjBFhdml9Ai0AM0xkmKXdlfT5PL1OIyX3CCJflx0VIAWb264HGsg47q6kndX kWlg== X-Gm-Message-State: AMke39lohUqI7YrXdnXOUHVFaaANyC3JWjh5kOZfCL0TaRwNfdc/HCTRcUAqxSeuNrbnO4InyuHCWvm3sa6ASg== X-Received: by 10.28.132.9 with SMTP id g9mr3957233wmd.28.1487789672266; Wed, 22 Feb 2017 10:54:32 -0800 (PST) MIME-Version: 1.0 Sender: virgile.prevosto@gmail.com Received: by 10.80.153.116 with HTTP; Wed, 22 Feb 2017 10:54:31 -0800 (PST) From: Virgile Prevosto Date: Wed, 22 Feb 2017 19:54:31 +0100 X-Google-Sender-Auth: McTrJEFczdIn5qKHZj4mZ3iiIzY Message-ID: To: OCAML Content-Type: text/plain; charset=UTF-8 Subject: [Caml-list] typechecking in 4.05+beta2 Dear list, while playing with the new beta, I stumbled upon the following issue. The program below is now rejected by the compiler, while this was not the case with 4.04. --- test.mli: module M(E: sig type t end): sig type t val u: t -> t -> t end --- test.ml: module M(E: sig type t end) = struct type t = (E.t, unit) Hashtbl.t let u = Hashtbl.fold (fun x () h -> Hashtbl.add h x (); h) end --- ocamlc test.mli ocamlc test.ml File "test.ml", line 1: Error: The implementation test.ml does not match the interface test.cmi: ... At position module M(E) : Modules do not match: sig type t = (E.t, unit) Hashtbl.t val u : ('_a, unit) Hashtbl.t -> ('_a, unit) Hashtbl.t -> ('_a, unit) Hashtbl.t end is not included in sig type t val u : t -> t -> t end At position module M(E) : Values do not match: val u : ('_a, unit) Hashtbl.t -> ('_a, unit) Hashtbl.t -> ('_a, unit) Hashtbl.t is not included in val u : t -> t -> t File "test.ml", line 3, characters 4-5: Actual declaration It is quite easy to fix, but I was wondering whether this restriction in type unification when checking the conformance of .ml and .mli was intended, and if yes, what is the reason behind it? Note that this is of course a reduction of the initial code, and all ingredients seems to be needed. Best regards, -- E tutto per oggi, a la prossima volta Virgile