diff --git a/src/Polysemy/Internal/Union.hs b/src/Polysemy/Internal/Union.hs index 209c6ec8..f0696838 100644 --- a/src/Polysemy/Internal/Union.hs +++ b/src/Polysemy/Internal/Union.hs @@ -295,7 +295,11 @@ extract (Union (There _) _) = error "Unsafe use of UnsafeMkElemOf" ------------------------------------------------------------------------------ -- | An empty union contains nothing, so this function is uncallable. absurdU :: Union '[] m a -> b -absurdU (Union _ _) = error "Unsafe use of UnsafeMkElemOf" +#if __GLASGOW_HASKELL__ >= 902 +absurdU = \case +#else +absurdU _ = error "Unsafe use of UnsafeMkElemOf" +#endif ------------------------------------------------------------------------------