It would be nice to have a more compact way to declare standalone deriving instances for polymorphic types.
newtype Foo a = Foo a
deriving instance Eq a => Eq (Foo a)
deriving instance Show a => Show (Foo a)
Is there such a shortcut? The declarations above are completely mechanical and get a bit tedious to read, especially when you’re defining multiple such types in close proximity.
Weird, I could’ve sworn that the compiler complained in similar cases, but maybe I was thinking of examples where the instance type was different from context, e.g Eq a => Foo [a] or some such. Problem solved then, thanks.
Hi @asarpeshkar If @cocreature was able to resolve your query completely, you can mark his post as the Solution, this helps in housekeeping on the forum.