import GHC.Generics data TNothing = TNothing data TJust a = TJust a class Something tag f where something :: f p -> tag instance (Something TNothing f, Something tag g) => Something tag (f :*: g) where something (_ :*: b) = something b instance (Something tag f, Something TNothing g) => Something tag (f :*: g) where something (a :*: _) = something a