[Haskell-cafe] Language complexity & beginners (Was: New type of ($) operator in GHC 8.0 is problematic)

Ben Gamari ben at smart-cactus.org
Thu Feb 11 12:33:09 UTC 2016


Takenobu Tani <takenobu.hs at gmail.com> writes:

> Hi,
>
> I understood one more point. (I share here.)
> The Prelude library document for ghc 8.0 is already well described for
> beginners/newcomers.
>
>  * The ($)'s signature of 8.0.1 is already simple (not include forall ...).
>  * The Bool's kind of 8.0.1 is already represented with "TYPE Lifted"
> (changed from '*').
>
>
> ghc7.8.4 [1]:
>
>   data Bool :: *
>   foldr :: (a -> b -> b) -> b -> [a] -> b
>   ($) :: (a -> b) -> a -> b
>
>
> ghc7.10.4 [2]:
>
>   data Bool :: *
>   foldr :: (a -> b -> b) -> b -> t a -> b
>   ($) :: (a -> b) -> a -> b
>
>
> ghc8.0.1-rc2 [3]:
>
>   data Bool :: TYPE Lifted

To clarify, this isn't actually a change; `*` is merely a synonym for
`TYPE 'Lifted`.

Moreover, I believe this is a bug. In general we should continue to show
`*` for plain lifted types. If you look at other types in the -rc2
haddocks you will see that they are indeed rendered as they were in
previous releases, with no kind annotation at all. Bool is likely only
rendered differently as it is a wired-in type; we'll need to fix this.
I've opened #11567 to track this issue.

Cheers,

- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160211/5411d68f/attachment.sig>


More information about the ghc-devs mailing list