Ticket #7503 (new bug)
Bug with PolyKinds, type synonyms & GADTs
| Reported by: | Ashley Yakeley | Owned by: | simonpj |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.8.1 |
| Component: | Compiler (Type checker) | Version: | 7.6.1 |
| Keywords: | Cc: | ||
| Operating System: | Linux | Architecture: | x86_64 (amd64) |
| Type of failure: | GHC rejects valid program | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
GHC incorrectly rejects this program:
{-# LANGUAGE ExistentialQuantification, DataKinds, PolyKinds, KindSignatures, GADTs #-}
module TestConstraintKinds where
import GHC.Exts hiding (Any)
data WrappedType = forall a. WrapType a
data A :: WrappedType -> * where
MkA :: forall (a :: *). AW a -> A (WrapType a)
type AW (a :: k) = A (WrapType a)
type AW' (a :: k) = A (WrapType a)
class C (a :: k) where
aw :: AW a -- workaround: AW'
instance C [] where
aw = aw
GHC accepts the program when AW is replaced with AW' on that line.
Change History
Note: See
TracTickets for help on using
tickets.
