Opened 5 years ago

Closed 5 years ago

#9576 closed bug (fixed)

-fdefer-type-errors doesn't defer errors from `deriving`

Reported by: goldfire Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.8.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: deriving/should_run/T9576
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


When I say

{-# OPTIONS_GHC -fdefer-type-errors #-}

data Foo = MkFoo
data Bar = MkBar Foo
  deriving Show

I get a type error that there is no instance for Show Foo. This error should be deferred.

Using standalone-deriving works just fine, though.

Change History (2)

comment:1 Changed 5 years ago by Simon Peyton Jones <simonpj@…>

In 74ae59896e4222a8115f5548845f13495f5bb76e/ghc:

Defer errors in derived instances

Fixes Trac #9576.  Turned out to be pretty easy.

comment:2 Changed 5 years ago by simonpj

Resolution: fixed
Status: newclosed
Test Case: deriving/should_run/T9576

Good suggestion, thanks.


Note: See TracTickets for help on using tickets.