Skip to content

Improve error message for failed deriving

The following does not work:

type family F a :: *

data D a = D (F a)
    deriving (Show)

The natural way of adding an instance does work (with enough extensions turned on):

instance (Show (F a)) => Show (D a) where
    show (D x) = "D " ++ show x

It would be nice if the deriving mechanism could derive this code.

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