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.4 required=5.0 tests=SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 6BBDCBBAF for ; Tue, 10 Mar 2009 11:48:14 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiIHAN6+tUnRVduld2dsb2JhbACUaz8BCgwJCRGtY45QAQSEBQ X-IronPort-AV: E=Sophos;i="4.38,335,1233529200"; d="scan'208";a="36334867" Received: from mail-ew0-f165.google.com ([209.85.219.165]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Mar 2009 11:48:14 +0100 Received: by ewy9 with SMTP id 9so1077079ewy.9 for ; Tue, 10 Mar 2009 03:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=vTTTukBhU5OK/7NX2AIm/8cEdGzcv0YGCmDuCQzT5yk=; b=oqASgKOWiBbYmioo602U0408ZVBtGhyWh1lpGVgp7oc2QFMlkOjZO26ZRrMMn/6Owb e29hU1INAKoUfguOAKaG1Z0WxiOXPer4ypQ2PMdCuYOBoZZmTo9xWW6nSy1yaHah72lu JgobI1guq20BBDQvm0e5VCGnn6kuqF/cIz6cc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=BM++RsvUZJFobTD7HNLswEVUzl1A0SQWMdUZE3Xcnyyfa4/8WBZKY+KEGEli49j7zs Q2W448GTWAiVEbEeAwZqEZb0TGFUbYFp5wjN6jpXzjKmfR0Vc1+jyveznUBux88WMSxe xzlstUaSTw06SklqrY0rzJb2zgoi53f2DQkpQ= MIME-Version: 1.0 Received: by 10.216.7.209 with SMTP id 59mr2574025wep.213.1236682093608; Tue, 10 Mar 2009 03:48:13 -0700 (PDT) Date: Tue, 10 Mar 2009 10:48:13 +0000 Message-ID: <9b415f950903100348n3fbe6803j970459cd535b8186@mail.gmail.com> Subject: Bug with include and module types ? From: Benedikt Grundmann To: OCaml Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; bug:01 grundmann:01 grundmann:01 bug:01 ocaml:01 sig:01 val:01 foo:01 val:01 sig:01 foo:01 struct:01 struct:01 cheers:01 calvin:98 Hi list, I stumbled across something which I believe to be a bug in the ocaml module type language: Objective Caml version 3.11.0 # module type S = sig val foo : string -> string -> int val bar : string -> string end;; module type S = sig val foo : string -> string -> int val bar : string -> string end # module type B = sig include S val foo : string -> int end;; module type B = sig val foo : string -> string -> int val bar : string -> string val foo : string -> int end # Observe that if you do the same thing in the module language, the behavior is different (imho correct) and foo is shadowed: # module S = struct let foo x y = 1 let bar s = s end ;; module S : sig val foo : 'a -> 'b -> int val bar : 'a -> 'a end # module B = struct include S let foo x = 1 end;; module B : sig val bar : 'a -> 'a val foo : 'a -> int end Cheers, Bene -- Calvin: I try to make everyone's day a little more surreal. (From Calvin & Hobbes)