Opened 5 years ago

Closed 5 years ago

#7151 closed bug (fixed)

GHC accepts invalid type declaration

Reported by: bitonic Owned by:
Priority: normal Milestone: 7.6.1
Component: Compiler Version: 7.4.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHC accepts invalid program Test Case: polykinds/T7151
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


The declaration

type Foo = [Int, String]

is accepted by GHC with no extensions enabled, while it is clearly invalid Haskell. I didn't think about it but I suspect it has to do with DataKinds stepping in when it shouldn't.

Change History (3)

comment:1 Changed 5 years ago by simonpj@…

commit 72e7f57cb4326c797f63d0c0c976241c02328209

Author: Simon Peyton Jones <>
Date:   Wed Aug 15 16:01:19 2012 +0100

    Require DataKinds for promoted list/tuple syntax in types
    Fixes Trac #7151

 compiler/rename/RnEnv.lhs       |    8 +-------
 compiler/rename/RnTypes.lhs     |   26 +++++++++++++++++++-------
 compiler/typecheck/TcHsType.lhs |    6 +++++-
 3 files changed, 25 insertions(+), 15 deletions(-)

comment:2 Changed 5 years ago by simonpj

difficulty: Unknown
Status: newmerge
Test Case: polykinds/T7151

Good point. Perhpas worth merging.

comment:3 Changed 5 years ago by pcapriotti

Milestone: 7.6.1
Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.