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 CDA658021A for ; Sat, 23 Sep 2017 22:38:30 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=alphablock@orange.fr; spf=None smtp.mailfrom=alphablock@orange.fr; spf=None smtp.helo=postmaster@smtp.smtpout.orange.fr Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alphablock@orange.fr) identity=pra; client-ip=80.12.242.126; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alphablock@orange.fr"; x-sender="alphablock@orange.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alphablock@orange.fr) identity=mailfrom; client-ip=80.12.242.126; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alphablock@orange.fr"; x-sender="alphablock@orange.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.smtpout.orange.fr) identity=helo; client-ip=80.12.242.126; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alphablock@orange.fr"; x-sender="postmaster@smtp.smtpout.orange.fr"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AdJi/sBIOCmzcRbFQytmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgXLPzxwZ3uMQTl6Ol3ixeRBMOAtKIC1rKempujcFJDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBWB6kG1uDUbHxG6MQtu?= =?us-ascii?q?Osz0HJTThoK5zbOc4ZrWNilBgTuwZ/tdMRS9rQzLuoFCiI96Kq87zhzCoVNPYe?= =?us-ascii?q?1Qym4uK0jFzEW03du54JM2q3cYgPkm7cMVCag=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AtBAARxcZZf37yDFBCGh4GDBkGDIQIC?= =?us-ascii?q?wNrJ4N2ixSPSwaBAJhnCiOFGAKEZxQBAQEBAQEBAQEBARIBAQkLCwgmMYIzIoJ?= =?us-ascii?q?EAwMjBAsBBVELGgImAgJXEwgCihYBCxEMMqdZgW06hmYVhBoMASAFgQ6CHYMLg?= =?us-ascii?q?lqCfYMxgVJMgkeCYAWhH3+GXox/hE2HD4cqjW2HWYE5NoEvUylahx90AYgoAQE?= =?us-ascii?q?B?= X-IPAS-Result: =?us-ascii?q?A0AtBAARxcZZf37yDFBCGh4GDBkGDIQICwNrJ4N2ixSPSwa?= =?us-ascii?q?BAJhnCiOFGAKEZxQBAQEBAQEBAQEBARIBAQkLCwgmMYIzIoJEAwMjBAsBBVELG?= =?us-ascii?q?gImAgJXEwgCihYBCxEMMqdZgW06hmYVhBoMASAFgQ6CHYMLglqCfYMxgVJMgke?= =?us-ascii?q?CYAWhH3+GXox/hE2HD4cqjW2HWYE5NoEvUylahx90AYgoAQEB?= X-IronPort-AV: E=Sophos;i="5.42,430,1500933600"; d="scan'208";a="238499627" Received: from smtp04.smtpout.orange.fr (HELO smtp.smtpout.orange.fr) ([80.12.242.126]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 23 Sep 2017 22:38:30 +0200 Received: from [192.168.1.10] ([86.209.60.247]) by mwinf5d08 with ME id D8eU1w00G5L3Wb2038eV9j; Sat, 23 Sep 2017 22:38:29 +0200 X-ME-Helo: [192.168.1.10] X-ME-Auth: YWxwaGFibG9ja0B3YW5hZG9vLmZy X-ME-Date: Sat, 23 Sep 2017 22:38:29 +0200 X-ME-IP: 86.209.60.247 To: caml-list@inria.fr References: <20170923174705.wkdryyzkixlroqdw@delli7.univ-savoie.fr> From: Damien Guichard Message-ID: <5da48da9-43db-701e-6e72-52daec319183@orange.fr> Date: Sat, 23 Sep 2017 22:40:00 +0200 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: <20170923174705.wkdryyzkixlroqdw@delli7.univ-savoie.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Validation-by: alphablock@orange.fr Subject: Re: [Caml-list] problem with generalisation Hi Christophe, Given the types, the only thing i can do is to promote an iterator : let promote i = {f = fun x -> i.f x} I can't do anything else and i eagerly wait the whole scholar answer. Regards, - Damien Guichard Christophe Raffalli a écrit : > Hello, > > I am blocked by this case not working (I reported on Mantis ... > https://caml.inria.fr/mantis/view.php?id=7636) > > Any hint on how to make it works, apart fomr Obj.magic ? > > I can not change the types, they come from a functor. > > ==================================================== > type ('a, 'b) elt = 'a > > type 'a iter = { f : 'b.('a, 'b) elt -> unit } > > let promote f : 'a -> unit = > let f : 'b.('a, 'b) elt -> unit = fun x -> f x in > { f } > ==================================================== > > Cheers, > Christophe