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 5E42B7F9BB for ; Wed, 2 Jul 2014 11:44:27 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai4EADnUs1NKN1ZKm2dsb2JhbABag1+CJ4Ehwy8BgSIPAQEBAQEGCwsJFCiEBAEFIwRSEAsaAiYCAkcQBhuIOgSqHpsrF4ErjUEzB4J3NoEWBZwuhSoXkD0 X-IPAS-Result: Ai4EADnUs1NKN1ZKm2dsb2JhbABag1+CJ4Ehwy8BgSIPAQEBAQEGCwsJFCiEBAEFIwRSEAsaAiYCAkcQBhuIOgSqHpsrF4ErjUEzB4J3NoEWBZwuhSoXkD0 X-IronPort-AV: E=Sophos;i="5.01,587,1400018400"; d="scan'208";a="83272391" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail2-smtp-roc.national.inria.fr with ESMTP; 02 Jul 2014 11:44:15 +0200 Received: from [172.20.10.2] (188.29.165.197.threembb.co.uk [188.29.165.197]) by smtp.webfaction.com (Postfix) with ESMTP id 2D3F02287747; Wed, 2 Jul 2014 09:43:29 +0000 (UTC) Date: Wed, 2 Jul 2014 10:43:27 +0100 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: Gabriel Kerneis Cc: Nicolas Ratier , caml-list@inria.fr Message-ID: <76B7BAE939614496917D59C84D90146B@erratique.ch> In-Reply-To: <20140702093037.GC4470@kerneis.info> References: <53B3C402.8070001@femto-st.fr> <61DE677B8B2B47D8802464F092A13EC2@erratique.ch> <20140702093037.GC4470@kerneis.info> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Caml-list] Case insensitive in type Le mercredi, 2 juillet 2014 =C3=A0 10:30, Gabriel Kerneis a =C3=A9crit : > It will not help with pattern-matching, though. The following will fail: >=20=20 > match (term "plus" []) with > | Term("Plus",[]) -> true > | _ -> assert false >=20=20 > I don't think there is a way to work around this. Yeah sure, the pattern matches you write have to follow the normalization. = A work around is to make the string abstract and then check via a when clau= se. match (term "plus" []) with=20=20 | Term (f, []) when f =3D Term.name "Plus" -> true | _ -> assert false Daniel