[GHC] #15601: Unexpected compile error on type level lists with a single element
GHC
ghc-devs at haskell.org
Tue Sep 4 00:20:11 UTC 2018
#15601: Unexpected compile error on type level lists with a single element
-------------------------------------+-------------------------------------
Reporter: erikd | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
Resolution: invalid | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by monoidal):
* status: new => closed
* resolution: => invalid
Comment:
This is unfortunately by design.
When type-level lists were added, the syntax `[a]` was already taken. For
example `[Integer]` is a list of integers, kind `*`. It's not a type-level
list with one entry, which would be kind `[*]`.
If we could start Haskell from scratch I would vote for having `['a', 'b']
:: List Char` instead of `['a', 'b'] :: [Char]` but it's too late to
change.
See
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html
#promoted-list-and-tuple-types
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15601#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list