[GHC] #15654: Use deriving Functor in the codebase