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 4ABB37FBBC for ; Wed, 7 Jan 2015 18:26:29 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yallop@gmail.com) identity=pra; client-ip=74.125.82.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yallop@gmail.com"; x-sender="yallop@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yallop@gmail.com designates 74.125.82.172 as permitted sender) identity=mailfrom; client-ip=74.125.82.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yallop@gmail.com"; x-sender="yallop@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-we0-f172.google.com) identity=helo; client-ip=74.125.82.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yallop@gmail.com"; x-sender="postmaster@mail-we0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah0BAIVrrVRKfVKsc2dsb2JhbABchDAEgwLIdAKBCAdDAQEBAQERAQoKDAkULoQMAQEBAwESER0BGx0BAwELBgULDQICJgICIgERAQUBHAYTCBqHdQEDCQijSD4xiy6Ba4J3ijgKGScNFT+CcwEBAQEGAQEBARgBBQ6BE45XB4JogUEFly6BDo0dgW8SI4EMCYQQPjGCQwEBAQ X-IPAS-Result: Ah0BAIVrrVRKfVKsc2dsb2JhbABchDAEgwLIdAKBCAdDAQEBAQERAQoKDAkULoQMAQEBAwESER0BGx0BAwELBgULDQICJgICIgERAQUBHAYTCBqHdQEDCQijSD4xiy6Ba4J3ijgKGScNFT+CcwEBAQEGAQEBARgBBQ6BE45XB4JogUEFly6BDo0dgW8SI4EMCYQQPjGCQwEBAQ X-IronPort-AV: E=Sophos;i="5.07,715,1413237600"; d="scan'208";a="95651692" Received: from mail-we0-f172.google.com ([74.125.82.172]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 07 Jan 2015 18:26:28 +0100 Received: by mail-we0-f172.google.com with SMTP id k11so1577346wes.17 for ; Wed, 07 Jan 2015 09:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dlPxeB8AGCpRdXZHniQtsIzfrV2amaS8dKTJn3jVt3o=; b=BA/1zZ15vgiR3vfjduxtBwAfDEBEPeswyxFrwRMXyiOYmUzRr9gFl+91LO8agXHON5 nz5llJhQi2eUKUjwHkDezQdoFl/x/XpPu6Y2hR1we2zzZ+ArD462zzGDBb8Tb558OaR0 F6Yocc7byO/CYZ1NRW61f0/fBOePz9gdFyUwPgPUhiNwrfRH/OgIwBjvc1O1Nc9BIMRz Lc6T7beg2CENOM3YZFWPOofwBEInJBRbr3yU/u6NsF+7u6W1QNJ5LcvENxq5lSRgivnu ZBB13Pz5gaSYdz+Ii5jWbL2e/TbU2o3ddC2xda5i6NtnJHh4qwEG+cbsd4EBfZgNzmrz 7l1Q== MIME-Version: 1.0 X-Received: by 10.180.7.198 with SMTP id l6mr9612219wia.26.1420651588234; Wed, 07 Jan 2015 09:26:28 -0800 (PST) Received: by 10.216.33.200 with HTTP; Wed, 7 Jan 2015 09:26:28 -0800 (PST) In-Reply-To: <20150107135012.GA17784@frosties> References: <20150107135012.GA17784@frosties> Date: Wed, 7 Jan 2015 17:26:28 +0000 Message-ID: From: Jeremy Yallop To: Goswin von Brederlow Cc: caml users Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Problem with universal functions in a module On 7 January 2015 at 13:50, Goswin von Brederlow wrote: > Why are function arguments less general than their original function? Polymorphic arguments complicate type checking and make type inference impossible, so OCaml doesn't allow them. > B) is there some way around this I'm not seeing? I don't think that there's any way of passing polymorphic arguments that works out simpler than using a record. Of course, in your simple example code it's possible to eliminate the GADT altogether, which would also eliminate the need for polymorphic arguments. Perhaps GADTs play a more essential role in your real code, though.