haskellfunctional-programmingghcidata-kindstype-kinds

Is there a way to have ghci print "Type" instead of "*" in kind signatures?


If I do

λ> :k Monad

at the ghci prompt, I get

Monad :: (* -> *) -> Constraint

Out of curiosity, is there a way to have it print Type instead of *?

I am reading Thinking with Types, and I've come to know that Type is the new * in kind signatures, but searching around I haven't found much (* is not something easily searched for), but I found this old discussion that at least refers to Data.Kind.Type.


Solution

  • You can work with the -XNoStarIsType flag, this will use Type instead of the asterisk (*). If I recall correctly, they eventually plan to abandon the asterisk:

    $ ghci -XNoStarIsType
    ghci> :k Monad
    Monad :: (Type -> Type) -> Constraint