Bikeshedding request for GHCi's :type

Iavor Diatchki iavor.diatchki at
Thu Apr 28 15:00:29 UTC 2016

Currently GHCi shows the "real" type of an expression (i.e., the inferred
generalized type), when you ask it:

Prelude> :t 1
1 :: Num a => a

Note that there is no defaulting happening, at least at the top level---of
course if there were local things that needed to be defaulted while the
expression was being type-checked then those would be defaulted.

If you ask GHCi to *evaluate* a polymorphic expression, then it will try to
default the type when it is figuring out how to show the result.  The
alternative would be to say "sorry, I can't evaluate this, because it is
polymorphic, so please tell me what type do you mean".  This is probably a
bit too inconvenient for practical use.


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

> > .. :type should report the real type
> What about defaulting? Is it real?
> - J.W.
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list