#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 Difficulty: Unknown
Test Case: polykinds/T7151 Blocked By:
Blocking: Related Tickets:

Description

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 20 months ago by simonpj@…

commit 72e7f57cb4326c797f63d0c0c976241c02328209

Author: Simon Peyton Jones <simonpj@microsoft.com>
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 20 months ago by simonpj

  • Difficulty set to Unknown
  • Status changed from new to merge
  • Test Case set to polykinds/T7151

Good point. Perhpas worth merging.

comment:3 Changed 20 months ago by pcapriotti

  • Milestone set to 7.6.1
  • Resolution set to fixed
  • Status changed from merge to closed
Note: See TracTickets for help on using tickets.