'Fun' pattern in COMPLETE set in Data.Typeable.Internal can be removed
Data.Typeable.Internal contains the following comment:
-- TODO: Remove Fun when #14253 is fixed
{-# COMPLETE Fun, App, Con #-}
{-# COMPLETE Fun, App, Con' #-}
Now, #14253 (closed) has been fixed a while ago, by !963 (closed), so we can remove Fun.
Doing so causes redundant pattern warnings to be emitted in GHC.Utils.Binary.Typeable and Data.Binary.Class (from the binary library). To handle this in a backwards compatible way, I believe the following course of action needs to be taken:
- remove
Funfrom the above twoCOMPLETEsets inData.Typeable.Internal, - bump
baseto4.17, - add CPP instructions in
GHC.Utils.Binary.TypeableandData.Binary.Classwhich conditionally remove these extra cases whenbase >= 4.17.
I've made a PR to binary here which should address (3) above; an almost identical patch can be made to GHC.Utils.Binary.Typeable.
Edited by sheaf