@@ -14,7 +14,6 @@
1414{-# LANGUAGE TypeOperators #-}
1515{-# LANGUAGE TypeSynonymInstances #-}
1616{-# LANGUAGE UndecidableInstances #-}
17−{-# LANGUAGE EmptyCase #-}
1817
1918#if __GLASGOW_HASKELL__ >= 706
2019{-# LANGUAGE PolyKinds #-}
@@ -92,7 +91,7 @@ import Data.Time.Format (FormatTime, formatTime)
9291import Data.Time.Locale.Compat (defaultTimeLocale)
9392import Data.Vector (Vector)
9493import Data.Version (Version, showVersion)
95−import Data.Void (Void)
94+import Data.Void (Void, absurd)
9695import Data.Word (Word16, Word32, Word64, Word8)
9796import Foreign.Storable (Storable)
9897import Foreign.C.Types (CTime (..))
@@ -707,7 +706,7 @@ instance ( AllNullary (a :+: b) allNullary
707706instance GToJSON Value arity V1 where
708707 -- Empty values do not exist, which makes the job of formatting them
709708 -- rather easy:
710− gToJSON _ _ x = case x of {}
709+ gToJSON _ _ x = x `seq` error "case: V1"
711710 {-# INLINE gToJSON #-}
712711
713712instance ToJSON a => GToJSON Value arity (K1 i a) where
@@ -1230,10 +1229,10 @@ instance (ToJSON a, ToJSON b) => ToJSON (Either a b) where
12301229 {-# INLINE toEncoding #-}
12311230
12321231instance ToJSON Void where
1233− toJSON x = case x of {}
1232+ toJSON = absurd
12341233 {-# INLINE toJSON #-}
12351234
1236− toEncoding x = case x of {}
1235+ toEncoding = absurd
12371236 {-# INLINE toEncoding #-}
12381237
12391238