Ticket #3954 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

Contexts on empty data decls falsely rejected

Reported by: ksf Owned by:
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 6.12.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHC rejects valid program Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

HList uses EmptyDataDecls? and contains

data HNat x => Label x ns desc 

which fails with

Data/HList/Label3.hs:37:0:
    No context is allowed on a GADT-style data declaration
    (You can put a context on each contructor, though.) 

, regressing from 6.10.

My crystal ball tells me someone has been simplifying the implementation of EmptyDataDecls? to be GADTs without where, and missed the corner case.

Change History

Changed 3 years ago by batterseapower

  • status changed from new to closed
  • resolution set to duplicate

Duplicate of #3850

Note: See TracTickets for help on using tickets.