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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 4B5EA81792 for ; Sat, 29 Jun 2013 01:54:15 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of marco-oweber@gmx.de) identity=pra; client-ip=212.227.15.18; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="marco-oweber@gmx.de"; x-sender="marco-oweber@gmx.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of marco-oweber@gmx.de designates 212.227.15.18 as permitted sender) identity=mailfrom; client-ip=212.227.15.18; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="marco-oweber@gmx.de"; x-sender="marco-oweber@gmx.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.gmx.net) identity=helo; client-ip=212.227.15.18; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="marco-oweber@gmx.de"; x-sender="postmaster@mout.gmx.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwCADsgzlHU4w8SlGdsb2JhbABbgzuDUKtIkDyBChYOAQEBAQcLCwkSKoIkAQUjBAsBVgsaAhgOAgIQRwaIDwEWCJ1vi0OHaAGJKYEmjX06glGBFgOYboUHhWmIPw X-IPAS-Result: AgwCADsgzlHU4w8SlGdsb2JhbABbgzuDUKtIkDyBChYOAQEBAQcLCwkSKoIkAQUjBAsBVgsaAhgOAgIQRwaIDwEWCJ1vi0OHaAGJKYEmjX06glGBFgOYboUHhWmIPw X-IronPort-AV: E=Sophos;i="4.87,962,1363129200"; d="scan'208";a="23872019" Received: from mout.gmx.net ([212.227.15.18]) by mail2-smtp-roc.national.inria.fr with ESMTP; 29 Jun 2013 01:54:14 +0200 Received: from mailout-de.gmx.net ([10.1.76.35]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0M52QK-1U2hlw18eM-00zJ5E for ; Sat, 29 Jun 2013 01:54:14 +0200 Received: (qmail invoked by alias); 28 Jun 2013 23:54:13 -0000 Received: from p4FF8B065.dip0.t-ipconnect.de (EHLO mail.gmx.net) [79.248.176.101] by mail.gmx.net (mp035) with SMTP; 29 Jun 2013 01:54:13 +0200 X-Authenticated: #9006135 X-Provags-ID: V01U2FsdGVkX1/mcp0MCHjmCpSEe4rAvcb4bfpGkU5vIh0wA22rSA w/gbGDxntefyG/ Received: by mail.gmx.net (sSMTP sendmail emulation); Fri, 28 Jun 2013 23:54:50 +0000 Content-Type: text/plain; charset=UTF-8 From: Marc Weber To: caml-list In-reply-to: <1372089559-sup-2177@nixos> References: <1372089559-sup-2177@nixos> Date: Sat, 29 Jun 2013 01:54:50 +0200 Message-Id: <1372463499-sup-1099@nixos> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 Subject: [Caml-list] Re: ocamlopt vs camlc, different behaviour - how to track down? Error: The implementation m.ml does not match the interface m.cmi: Values do not match: val empty : ('_a, 'b) t is not included in val empty : ('a, 'b) t File "m.ml", line 11, characters 4-9: Actual declaration make: *** [m.cmo] Error 2 files as zip: http://mawercer.de/tmp/test-case.zip contents: makefile ========================= default: m.cmo m.cmi: m.mli ocamlc -o $@ -c $< m.cmo: m.ml m.cmi ocamlc -o $@ -c $< m.ml ============================ type ('k, 'v) map = | Empty | Node of ('k, 'v) map * 'k * 'v * ('k, 'v) map * int type ('k, 'v) t = { cmp : 'k -> 'k -> int; map : ('k, 'v) map; } let empty = let () = print_string "[\"pMap.ml\": 81:12-42 81:42]\n" in { cmp = compare; map = Empty; }; m.mli ============================ type ('a, 'b) t val empty : ('a, 'b) t In cases like first, find_all I was able to workaround this compilation error by adding explicit parameters, eg find_all a b = find a b instead of find_all = find However in the "empty" case I need more help. How to make this case compile ? Marc Weber