[GHC] #10188: prefix type-level cons can't be parsed
GHC
ghc-devs at haskell.org
Tue Mar 24 05:00:09 UTC 2015
#10188: prefix type-level cons can't be parsed
-------------------------------------+-------------------------------------
Reporter: Kinokkory | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.4
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: GHC rejects
Unknown/Multiple | valid program
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
Whereas other type operators (whether used as type families or used as
data constructors) can be safely used in a prefix form, only the type-
level cons of the built-in list kind can't be used in a prefix form.
It really is a problem because we don't have any means to express type-
level cons itself in source code. This for example prevents us from
writing a generic type-level foldr that takes the built-in list and other
similar data types alike.
In a ghci:
{{{#!hs
> :set -XDataKinds -XTypeOperators
> data Listy a = a ::: Listy a
> :kind! (:::)
(:::) :: k -> Listy k -> Listy k
= forall (k :: BOX). (':::)
> :kind! (:)
<interactive>:1:2: parse error on input ‘:’
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10188>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list