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 07A467FDEE for ; Thu, 2 Jun 2016 21:18:44 +0200 (CEST) IronPort-PHdr: 9a23:R1YY2hSHy1GHzewkyXFudOpU/dpsv+yvbD5Q0YIujvd0So/mwa64YhON2/xhgRfzUJnB7Loc0qyN4/GmBD1LuM3d+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8yVPlQD3WHhKZpJbzyI7izp/vEMhoVjLqtjgjDomVBvP9ps+GVzOFiIlAz97MrjtLRq8iBXpu5zv5UYCfayLOwESukSBz0jNyUx5db3nRjFVwqGoHUGGC1CmRNNB03B7Qrmdpb3qCrz8ORnjnq0J8rzGPofUC6v87tmDFfKgSweKjMiuimDgcVqgb5HrTqkrBl22JLZeseePawtLevmYdoGSD8ZDY5qXCtbD9bkYg== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=carette@mcmaster.ca; spf=None smtp.mailfrom=carette@mcmaster.ca; spf=None smtp.helo=postmaster@FHSHC4H16-1.csu.mcmaster.ca Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of carette@mcmaster.ca) identity=pra; client-ip=130.113.22.3; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="carette@mcmaster.ca"; x-sender="carette@mcmaster.ca"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of carette@mcmaster.ca) identity=mailfrom; client-ip=130.113.22.3; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="carette@mcmaster.ca"; x-sender="carette@mcmaster.ca"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@FHSHC4H16-1.csu.mcmaster.ca) identity=helo; client-ip=130.113.22.3; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="carette@mcmaster.ca"; x-sender="postmaster@FHSHC4H16-1.csu.mcmaster.ca"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DvAgCHhVBXgAMWcYJegm0hggW8O4YSAiOBDzsRAQEBAQEBAQERAQELCwkJISQLQRIBgVyCDBCBCwELAR5WJgEEG4gnAaFdoUePNoMqgi4Fjh2KFAYBgS6OWod7hTiPTDSEDoNshn8BfgEBAQ X-IPAS-Result: A0DvAgCHhVBXgAMWcYJegm0hggW8O4YSAiOBDzsRAQEBAQEBAQERAQELCwkJISQLQRIBgVyCDBCBCwELAR5WJgEEG4gnAaFdoUePNoMqgi4Fjh2KFAYBgS6OWod7hTiPTDSEDoNshn8BfgEBAQ X-IronPort-AV: E=Sophos;i="5.26,407,1459807200"; d="scan'208,217";a="179943810" Received: from fhshc4h16-1.csu.mcmaster.ca ([130.113.22.3]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 02 Jun 2016 21:18:42 +0200 Received: from FHSDB2D11-2.csu.mcmaster.ca ([fe80::2924:2ca:3cbc:4521]) by FHSHC4H16-1.csu.mcmaster.ca ([2002:8271:1603::8271:1603]) with mapi id 14.03.0279.002; Thu, 2 Jun 2016 15:18:41 -0400 From: "Carette, Jacques" To: "caml-list@inria.fr" Thread-Topic: Option to fully expand types in error messages? Thread-Index: AdG9A5GLssEk6Qd8TUiu0LqSgShZcw== Date: Thu, 2 Jun 2016 19:18:39 +0000 Message-ID: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [130.113.22.227] x-tm-as-product-ver: SMEX-11.0.0.1191-8.000.1202-22366.005 x-tm-as-result: No--34.481400-8.000000-31 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [Caml-list] Option to fully expand types in error messages?
In writing some code which uses a lot of monads with underlying type= s which use constraints, even simple errors can lead to extremely hard to r= ead error messages.  The main reason is that the two types given in errors are partially expanded, to different= levels.  This frequently means that the part where the type checker d= etects a mismatch is (extremely) opaque to human eyes.

In that case, it would actually be preferable to fully expand the types.&nb= sp; Yes, that will produce wallpaper.  But at least the mismatch shoul= d be considerably easier to catch.

Does this already exist, or should I submit a feature request?

Jacques