In the following toy example we create a new type D for which we want to implement the typeclass Show. Now let's say for all constructors the derived show function would be just fine, except for one special case A for which we want to override that default.
Is it possible to do that, or can you just have all or none of them derived?
data D = A | B | C
deriving (Show)
-- goal:
-- show A = "A is special"
-- show B = "B"
-- show C = "C"
main = print $ show A