Bikeshedding request for GHCi's :type

Trevor Elliott trevor at
Fri Apr 29 15:30:42 UTC 2016


Part of what you would like is already there. If you run ghci with -Wall,
you will get warnings about defaulting polymorphic expressions.

Prelude> 1

<interactive>:2:1: Warning:
    Defaulting the following constraint(s) to type ‘Integer’
      (Num a0) arising from a use of ‘it’ at <interactive>:2:1
      (Show a0) arising from a use of ‘print’ at <interactive>:2:1
    In the first argument of ‘print’, namely ‘it’
    In a stmt of an interactive GHCi command: print it


On Thu, Apr 28, 2016 at 8:05 AM Johannes Waldmann <
johannes.waldmann at> wrote:

> Hi,
> > If you ask GHCi to *evaluate* a polymorphic expression, then it will ...
> Sure, I understand the motivation for defaulting,
> and I am not suggesting to change anything there.
> What I am saying is that I see no way to have ghci show
> * the defaulted type,
> * or the even the fact that defaulting did happen.
> - J.
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list