Promoted types accepted without language extensions

Sean Leather leather at cs.uu.nl
Mon Nov 19 15:18:54 CET 2012


We discovered that GHC and GHCi (7.4.1) accept promoted types without
specifying language extensions (and even when specifying -XHaskell98).

For example, promoted lists are accepted:

Prelude> type T = [Int,Char]
Prelude> :i T
type T = (:) * Int ((:) * Char ([] *))
  -- Defined at <interactive>:2:6

Also, promoted datatypes:

> data N = Z
> type T = 'Z

I'm guessing you can't use these types anywhere (since they are not kind
*), so they won't be very useful, but it seems like this should be
disallowed.

Regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20121119/851091a6/attachment.htm>


More information about the Glasgow-haskell-users mailing list