From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 1F5F082581 for ; Tue, 26 Feb 2019 07:23:45 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=hendrik@topoi.pooq.com; spf=None smtp.mailfrom=hendrik@topoi.pooq.com; spf=None smtp.helo=postmaster@april.topoi.pooq.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=pra; client-ip=69.165.131.134; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=mailfrom; client-ip=69.165.131.134; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@april.topoi.pooq.com) identity=helo; client-ip=69.165.131.134; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="postmaster@april.topoi.pooq.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AkzmSwBHtXWE4K32GlsRhGp1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ78ocqwAkXT6L1XgUPTWs2DsrQY07qQ6/iocFdDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZr?= =?us-ascii?q?KeTpAI7SiNm82/yv95HJbAhEmDmwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+?= =?us-ascii?q?NYxWNpIVKcgRPx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UwzeITLTb4yBHsw0RmeKOMY4zG4Y?= =?us-ascii?q?UqCmSsk50ha38gT9zug/d7eGymgjrZvmkeNNyajTmBU1r2YmBtyH0mXLU2ZsmW?= =?us-ascii?q?JOXzgxxeZ0pkkvklo=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BkCwAK23Rc/4aDpUVkghmDWhKNKKUog?= =?us-ascii?q?Xo4AYhoBgY2BAwBAwEBAgEBAQEBbCiCOikBgxQTezQdMYUmrD0zhUSEd4xfgX+?= =?us-ascii?q?DdgGLDgKRXJIGCYJAkBwMGWmSLp5zBxeBVjMaCBsVgyiQeiSBNQEBjzcBAQ?= X-IPAS-Result: =?us-ascii?q?A0BkCwAK23Rc/4aDpUVkghmDWhKNKKUogXo4AYhoBgY2BAw?= =?us-ascii?q?BAwEBAgEBAQEBbCiCOikBgxQTezQdMYUmrD0zhUSEd4xfgX+DdgGLDgKRXJIGC?= =?us-ascii?q?YJAkBwMGWmSLp5zBxeBVjMaCBsVgyiQeiSBNQEBjzcBAQ?= X-IronPort-AV: E=Sophos;i="5.58,414,1544482800"; d="scan'208";a="297319963" Received: from topoi.pooq.com (HELO april.topoi.pooq.com) ([69.165.131.134]) by mail3-smtp-sop.national.inria.fr with ESMTP; 26 Feb 2019 07:23:43 +0100 Received: by april.topoi.pooq.com (Postfix, from userid 1001) id A17AEC4A30; Tue, 26 Feb 2019 01:23:41 -0500 (EST) Date: Tue, 26 Feb 2019 01:23:41 -0500 From: Hendrik Boom To: Ocaml Mailing List Message-ID: <20190226062341.t35u2tz5tole2jyv@topoi.pooq.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Subject: [Caml-list] An awkwardness with type parameters I have a (broken) function definition starting: let mixfix : 'token1 'phrase1. ('token1, 'phrase1, ('token1, 'phrase1) Phrasestream.phrasestream) grammar -> ('token1, 'phrase1) parser = fun gram -> ( ... It goes o for a hundred-odd lines. The type-parameterized types Phrasestream.phrasestream, grammar, and parser have been previously defined, and there are also operations defined on these types. The problem I'm having is that the OCaml type-checker ends up identifying the type parameters 'token1 an 'phrase1 because of type errors I've made in the body of the mixfix function. Somewhere I ended up using an operator that's supposed to work on values of type 'token1 on a value of type 'phrase1 instead, and identification of 'token1 and 'phrase1 is the natural result. Is there some way of forcing the type checker to treat 'token1 and 'phrase1 as different types so that I can get meaningful type errors at the point were they occur? With the present setup I only get type violation messages much later, when I try to use the mixfix function. It's far too late to trace the problem back to the actual error by that time. -- hendrik