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 E6F7F7FDEE for ; Thu, 2 Jun 2016 21:45:46 +0200 (CEST) IronPort-PHdr: 9a23:ueIFKBf6TPSWqfDa2zG4NtmBlGMj4u6mDksu8pMizoh2WeGdxc6zZR7h7PlgxGXEQZ/co6odzbGG4ua9CCdZusrJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbviqtuOMk4R32b1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu3SNp41Rr1ADTkgL3t9pIiy7UGCHkOz4S5WeWwMnwZUDkyNzhjxR4r8qWGy4uF0wiSGIcDeSLsxUC++4r0tQxa+2wkdMDts32jdkM19iOpgqxKsvRFli9rbaYuPNfd6OLjWfd4ASHBpUcNYVigHCYS5OdhcR9EdNPpV+tGu72AFqgGzUEz1XLvi Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-io0-f182.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.223.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.223.182 as permitted sender) identity=mailfrom; client-ip=209.85.223.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-io0-f182.google.com) identity=helo; client-ip=209.85.223.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-io0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DTAACRjFBXerbfVdFehQ0Gry2LFYF5hhICgSwHOBQBAQEBAQEBAREBAQkLCwkfMYIwghYBAQQSER0BGx0BAwwGBQsNAgImAgIiAREBBQEcBhMbB4dyAQMXo1uBMT4xizuBaoJYBYdyChknDVKDTQEBAQEGAQEBARsCBhBxhSaETYdBglkBBJg3gVaMSoFph3uFOI4NEh6BDx6CMIIQIDKKfAEBAQ X-IPAS-Result: A0DTAACRjFBXerbfVdFehQ0Gry2LFYF5hhICgSwHOBQBAQEBAQEBAREBAQkLCwkfMYIwghYBAQQSER0BGx0BAwwGBQsNAgImAgIiAREBBQEcBhMbB4dyAQMXo1uBMT4xizuBaoJYBYdyChknDVKDTQEBAQEGAQEBARsCBhBxhSaETYdBglkBBJg3gVaMSoFph3uFOI4NEh6BDx6CMIIQIDKKfAEBAQ X-IronPort-AV: E=Sophos;i="5.26,407,1459807200"; d="scan'208";a="220871098" Received: from mail-io0-f182.google.com ([209.85.223.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 02 Jun 2016 21:45:23 +0200 Received: by mail-io0-f182.google.com with SMTP id t40so56163962ioi.0 for ; Thu, 02 Jun 2016 12:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/x46S7tm/CNFuNdv7tIZ248kV7sP8t5SMVCZdP4Dgl4=; b=CfqYaYNrYfKX53w8mSQANAuf4HVQsRtruBAzLyAjcSpEoJ3WjMAPj+fehqCXRO+K2B CR3AvIArOp4wkwaX6FNVZzN9usDeCA53Ae3e5ekZE6924POQFIGiX6WTNgRCCgWFv6iK owEXkPKeXHpdvXb0Wms/9exvQ1qHIsV05unOpRP8ocOKqGbxDaxawGOaPVl9+NxgFsTH L3CpuXBkWqdiEFoSAQDLa1hvtHS3iSZHmCdqLAO3qUrfXjnM7yuYrMN+8Nj7qyW32VNh HcTeamObraHeclSxKmpmDxcbXFZ47D+qSfqeVug5yCzwmrxWynWekOEqWiZ/Z8TeeIsV uhWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/x46S7tm/CNFuNdv7tIZ248kV7sP8t5SMVCZdP4Dgl4=; b=aKv2tvxyXrsWpi/2LiNlbcWkGsHAfkTnwNMzTh+cI1LmPvC1jSjKTrYoaUJ1Hiyg+/ CdgE0fc1R5vXczutVOVrh+hG05C5D/uF1TobfpUX6MEj0RseIn5we1kEwC+WYiRIQzl+ 8UIvOFLrzx0AjmlFEuiA9uSkPeKNJ5NeP2rCJ/e5xoF+E3lRElA3mb9LZtYCxXY/xzmA UZZVAv/WpJFqJ4f4nFHy0X6ichO4jMAMorA7fID9lM7s9XDq5HAUltNkme5L2fLMXhOz E/bWLQjRLNKeS636SeSgLNWBL2YzHleGFw4I7mSUDN9Lp+aJgVsA4vqZ0l+GSWNTpgQT ofkA== X-Gm-Message-State: ALyK8tKxyNaiGY6AT0YsT0w+l7t2xz7BgZW/ut10YDIq2lzTL6k8tVYlZ4WcOhCxnhh4idMJbONjl3EhDBdPOg== X-Received: by 10.107.169.67 with SMTP id s64mr549287ioe.19.1464896722055; Thu, 02 Jun 2016 12:45:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.89.195 with HTTP; Thu, 2 Jun 2016 12:44:42 -0700 (PDT) In-Reply-To: References: From: Gabriel Scherer Date: Thu, 2 Jun 2016 15:44:42 -0400 Message-ID: To: "Carette, Jacques" Cc: "caml-list@inria.fr" Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Option to fully expand types in error messages? This does not exist to my knowledge. I think that in a bug report, it would be interesting if you could include some reproducible code and an example of the error messages that are not readable. I would expect that a better solution exists, that expands enough of the paths to clarify the error, without expanding constraints that are not related to the type error. One thing you might try to play with is the -short-paths options, that tries to print shorter types (but is also possibly less predictable); it can expand more if that can result in showing a shorter path, so for types that are synonyms of existing paths plus constraints it might result in constraint expansion. (I suspect it will not solve your problem, but that it may be of interest to other people with unclear type error messages.) On Thu, Jun 2, 2016 at 3:18 PM, Carette, Jacques wrote: > In writing some code which uses a lot of monads with underlying types which > use constraints, even simple errors can lead to extremely hard to read 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 detects a mismatch is (extremely) opaque to > human eyes. > > In that case, it would actually be preferable to fully expand the types. > Yes, that will produce wallpaper. But at least the mismatch should be > considerably easier to catch. > > Does this already exist, or should I submit a feature request? > > Jacques