Opened 9 years ago

Closed 9 years ago

Last modified 44 years ago

#425 closed bug (Fixed)

Template Haskell: reification of data types w/o constructors

Reported by: wthaller Owned by: nobody
Priority: normal Milestone:
Component: Template Haskell Version: 6.4
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Reifying data types without constructors works in --make mode, but 
causes an exception in TcSplice.lhs in one-shot compilation.

Attachments (1)

ReifyBug.2.zip (522 bytes) - added by wthaller 9 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by wthaller

Logged In: YES 
user_id=566359

A simple test case is attached.
ghc --make Main.hs works as expected.

ghc -c Foo.hs ; ghc -c Main.hs
yields the following error:

Main.hs:1:0:
    Exception when trying to run compile-time code:
      typecheck/TcSplice.lhs:(577,4)-(587,87): Non-exhaustive patterns in 
case

      Code: testReify 'Foo

Changed 9 years ago by wthaller

comment:2 Changed 9 years ago by wthaller

Logged In: YES 
user_id=566359

In fact, it happens whenever no constructors are exported for the data 
type.

comment:3 Changed 9 years ago by nobody

Logged In: NO 

Thanks. Now fixed.

Simon

comment:4 Changed 9 years ago by simonpj

  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.