Ticket #5882 (closed bug: fixed)

Opened 15 months ago

Last modified 11 months ago

Template Haskell declaration quote reports error with GADT syntax

Reported by: goldfire Owned by:
Priority: normal Milestone: 7.6.1
Component: Template Haskell Version: 7.4.1
Keywords: TemplateHaskell GADTSyntax Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHC rejects valid program Difficulty: Unknown
Test Case: th/T5882 Blocked By:
Blocking: Related Tickets:

Description

Consider the following code:

{-# LANGUAGE GADTSyntax, TemplateHaskell, KindSignatures #-}

data Foo :: * -> * where
  Foo :: Foo a

$( [d|
  data Bar :: * -> * where
    Bar :: Bar a
 |] )

The type Foo compiles just fine. The type Bar does not.

Change History

Changed 14 months ago by simonpj@…

commit fb28754f97b957e026c52db97bb677dd62972eca

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Mar 16 15:57:20 2012 +0000

    Complete the fix for Trac #5882

 compiler/deSugar/DsMeta.hs |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

Changed 14 months ago by simonpj

  • testcase set to th/T5882
  • difficulty set to Unknown

Excellent point. A bit fiddly, because TH's syntax isn't quite as expressive as GHC's, but done.

Simon

Changed 11 months ago by pcapriotti

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 7.6.1
Note: See TracTickets for help on using tickets.