Bikeshedding request for GHCi's :type

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


Hi,

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
1
Prelude>
```

--trevor

On Thu, Apr 28, 2016 at 8:05 AM Johannes Waldmann <
johannes.waldmann at htwk-leipzig.de> 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 haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160429/2dc199d9/attachment.html>


More information about the ghc-devs mailing list