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.waldm...@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@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to