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 3EFD77F61E for ; Sat, 4 Nov 2017 20:03:03 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=sp@orbitalfox.com; spf=None smtp.mailfrom=sp@orbitalfox.com; spf=None smtp.helo=postmaster@orbitalfox.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of sp@orbitalfox.com) identity=pra; client-ip=95.172.232.202; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sp@orbitalfox.com"; x-sender="sp@orbitalfox.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of sp@orbitalfox.com) identity=mailfrom; client-ip=95.172.232.202; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sp@orbitalfox.com"; x-sender="sp@orbitalfox.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@orbitalfox.com) identity=helo; client-ip=95.172.232.202; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sp@orbitalfox.com"; x-sender="postmaster@orbitalfox.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A1sVWNBYYiWUDT+VpCEwReaX/LSx+4OfEezUN459i?= =?us-ascii?q?sYplN5qZpsi+bnLW6fgltlLVR4KTs6sC0LWG9f24EUU7or+/81k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i76vnYuHUD0PA9x?= =?us-ascii?q?Y+D0AZL6jsKt1un09YeATR9PgW+GWfsmNw2eqh/bt9UfhYVlOuA6zR6f8SgAQP?= =?us-ascii?q?hf2W49fQHbpB37/MrlpJM=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AUBQBaDf5Z/8rorF9cHAEBBAEBCgEBg?= =?us-ascii?q?zRnayeDfYofjxuBfJZGghGEMAGBFAIMhEs/GAEBAQEBAQEBAQFqKII4IoJEAQE?= =?us-ascii?q?BAQIBIx0BASoKBAQLCxgCAiYCAlcTCAEBihcMp31rgieDCQEBBYgiCIEPgh+CB?= =?us-ascii?q?4NlgXSBDYVdgkmCYqF+FZZ4iXyHPJdPHziBbHoVSYJkgk2CEkE2jGgBAQE?= X-IPAS-Result: =?us-ascii?q?A0AUBQBaDf5Z/8rorF9cHAEBBAEBCgEBgzRnayeDfYofjxu?= =?us-ascii?q?BfJZGghGEMAGBFAIMhEs/GAEBAQEBAQEBAQFqKII4IoJEAQEBAQIBIx0BASoKB?= =?us-ascii?q?AQLCxgCAiYCAlcTCAEBihcMp31rgieDCQEBBYgiCIEPgh+CB4NlgXSBDYVdgkm?= =?us-ascii?q?CYqF+FZZ4iXyHPJdPHziBbHoVSYJkgk2CEkE2jGgBAQE?= X-IronPort-AV: E=Sophos;i="5.44,343,1505772000"; d="scan'208";a="243422587" Received: from orbitalfox.com ([95.172.232.202]) by mail3-smtp-sop.national.inria.fr with ESMTP; 04 Nov 2017 20:03:02 +0100 Received: from [192.168.88.5] (unknown [192.168.88.5]) by orbitalfox.com (Postfix) with ESMTPSA id 9F57DAA0070 for ; Sat, 4 Nov 2017 19:03:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=orbitalfox.com; s=orbitalfox; t=1509822181; bh=ZmxBrJmBQ/ZdvsF/YXhhPQAfFzH4ijphrqk5RfR1c7Q=; h=Subject:To:References:From:Date:In-Reply-To; b=Ib1brtz6CjwrNBNtHuIMT9YjrHIwrPu5XOsb2JEKT+HqPy1Jb/T75cldZrdEGeuEP vWXD7B8uC1ETz05yZISy4E/oIWMw67VnNo0HUG2tJe2FhNEzMw7XVHKO/8F0Gw6T36 o37g0FGKp9MCVvsuHd6pfGkjyYw8wfiirLmRSdhY= To: caml-list@inria.fr References: <86o9p2ywgc.fsf@gmail.com> <20171020113815.GD32138@nunchakus.loria.fr> <20171024133026.uovvzdbnamnzoknv@annexia.org> <20171104184401.3el2vbha2tgpvse5@annexia.org> <20171104185354.2wlsvr57b66gl4pg@annexia.org> From: SP Message-ID: Date: Sat, 4 Nov 2017 19:03:00 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171104185354.2wlsvr57b66gl4pg@annexia.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] What if exn was not an open type? On 04/11/2017 18:53, Richard W.M. Jones wrote: > I don't want to write it in C, as OCaml has considerable advantages. > In fact, the code was converted from C to gain these advantages > already. Might be best to avoid that style then. > I'm not familiar with this, what is the "generic return"? One way is to make a module which has different signatures depending on the module parameter. Then you can have different instances, like String.c_return and Int.c_return. Also I think there are ways you can make a function polymorphic, less tedious, but someone else might be better covering those. -- SP