@@ -1,5 +1,6 @@
11{-# LANGUAGE ApplicativeDo #-}
22{-# LANGUAGE ConstraintKinds #-}
3+{-# LANGUAGE CPP #-}
34{-# LANGUAGE EmptyCase #-}
45{-# LANGUAGE EmptyDataDecls #-}
56{-# LANGUAGE FlexibleContexts #-}
@@ -224,7 +225,19 @@ hoistR f (x :=> Identity y) = f x :/ y
224225infixr 5 :.
225226type (:.) = (,)
226227
228+#ifdef __GLASGOW_HASKELL__
229+#if __GLASGOW_HASKELL__ >= 810
227230{-# COMPLETE (:.) #-}
231+#else
232+{-# WARNING (:.)
233+ [ "Use of this pattern in GHC < 8.10 will result in spurious non-exhaustive warnings at every use site."
234+ , "We cannot provide a COMPLETE pragma to silence these due to a GHC bug: https://gitlab.haskell.org/ghc/ghc/issues/17729."
235+ , "The bug hides incompleteness warnings for all two tuples when the COMPLETE pattern is in scope."
236+ , "Instead, you should use (,) directly until you can switch to GHC >= 8.10, where the COMPLETE pragma is reinstated."
237+ ]
238+ #-}
239+#endif
240+#endif
228241pattern (:.) :: a -> b -> a :. b
229242pattern a :. b = (a, b)
230243