Skip to content

-ddump-deriv doesn't dump failed newtype-deriving

When I say

{-# LANGUAGE GeneralizedNewtypeDeriving, TypeFamilies #-}
{-# OPTIONS_GHC -ddump-deriv #-}

type family F a
type instance F Int = Bool

class C a where
  meth :: a -> F a

instance C Int where
  meth = (> 0)

newtype Age = MkAge Int
  deriving C

I get an error (which I should), but I don't get the derived C instance, as requested by -ddump-deriv. The output should include this helpful information.

Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information