diff options
author | sheaf <sam.derbyshire@gmail.com> | 2022-03-31 11:59:25 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-04-07 07:55:52 -0400 |
commit | 429ea5d9147a9d3bd2513b27a4064c1ca1be2090 (patch) | |
tree | ead29d6921d9432db2a88c424787adfcad40bd89 | |
parent | 88d610317a707eb33fe8f1a1a8ab6456279861f2 (diff) | |
download | haskell-429ea5d9147a9d3bd2513b27a4064c1ca1be2090.tar.gz |
Remove Fun pattern from Typeable COMPLETE set
GHC merge request !963 improved warnings in the presence of
COMPLETE annotations. This allows the removal of the Fun pattern
from the complete set.
Doing so expectedly causes some redundant pattern match warnings,
in particular in GHC.Utils.Binary.Typeable and Data.Binary.Class
from the binary library; this commit addresses that.
Updates binary submodule
Fixes #20230
-rw-r--r-- | compiler/GHC/Utils/Binary/Typeable.hs | 2 | ||||
-rw-r--r-- | libraries/base/Data/Typeable/Internal.hs | 5 | ||||
m--------- | libraries/binary | 0 |
3 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Utils/Binary/Typeable.hs b/compiler/GHC/Utils/Binary/Typeable.hs index 7bef358e73..5734905ebd 100644 --- a/compiler/GHC/Utils/Binary/Typeable.hs +++ b/compiler/GHC/Utils/Binary/Typeable.hs @@ -198,10 +198,12 @@ putTypeRep bh (App f x) = do put_ bh (2 :: Word8) putTypeRep bh f putTypeRep bh x +#if __GLASGOW_HASKELL__ < 903 putTypeRep bh (Fun arg res) = do put_ bh (3 :: Word8) putTypeRep bh arg putTypeRep bh res +#endif instance Binary Serialized where put_ bh (Serialized the_type bytes) = do diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs index da786bd6d3..b1441fee84 100644 --- a/libraries/base/Data/Typeable/Internal.hs +++ b/libraries/base/Data/Typeable/Internal.hs @@ -572,9 +572,8 @@ pattern Con' :: forall k (a :: k). () => TyCon -> [SomeTypeRep] -> TypeRep a pattern Con' con ks <- (splitApp -> IsCon con ks) --- TODO: Remove Fun when #14253 is fixed -{-# COMPLETE Fun, App, Con #-} -{-# COMPLETE Fun, App, Con' #-} +{-# COMPLETE App, Con #-} +{-# COMPLETE App, Con' #-} {- Note [Con evidence] ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/libraries/binary b/libraries/binary -Subproject 55c8b3e0d2d30fee1c6b0a5c96b46c432e29e35 +Subproject 6af054b4431fa7c20bf6309536cfef7d47f2c17 |