on master help sign in
Higher kinded json classes now preserve String behavior
commitc6e3dd9f9a2bf2b05ed6de09515ee11b21680fd7 authorAndrew Martin <amartin@layer3com.com> dateMon 2 May 2016, 14:30 (10 years ago) parentddba960
5 files changed+183−153
Data/Aeson/Encode/Functions.hs−7 Data/Aeson/Types/Class.hs+49−13 Data/Aeson/Types/Instances.hs+42−43 Data/Aeson/Types/Instances/Tuple.hs+86−84 tuple-instances.hs+6−6
Data/Aeson/Encode/Functions.hs−7
@@ -41,13 +41,6 @@ foldable :: (Foldable t) => (a -> Encoding) -> t a -> Encoding
4141foldable to = brackets '[' ']' . foldMap (Value . to)
4242{-# INLINE foldable #-}
4343
44−list :: (a -> Encoding) -> [a] -> Encoding
45−list _ [] = emptyArray_
46−list to (x:xs) = Encoding $
47− char7 '[' <> fromEncoding (to x) <> commas xs <> char7 ']'
48− where commas = foldr (\v vs -> char7 ',' <> fromEncoding (to v) <> vs) mempty
49−{-# INLINE list #-}
50−
5144brackets :: Char -> Char -> Series -> Encoding
5245brackets begin end (Value v) = Encoding $
5346 char7 begin <> fromEncoding v <> char7 end
Data/Aeson/Types/Class.hs+49−13
@@ -44,6 +44,9 @@ module Data.Aeson.Types.Class
4444 , KeyValue(..)
4545 -- * Functions needed for documentation
4646 , typeMismatch
47+ -- * Encoding functions
48+ , list
49+ , listValue
4750 ) where
4851
4952import Data.Aeson.Types.Internal
@@ -204,7 +207,7 @@ class ToJSON a where
204207 {-# INLINE toEncoding #-}
205208
206209 toJSONList :: [a] -> Value
207− toJSONList = Array . V.fromList . map toJSON
210+ toJSONList = listValue toJSON
208211 {-# INLINE toJSONList #-}
209212
210213 toEncodingList :: [a] -> Encoding
@@ -403,28 +406,36 @@ typeMismatch expected actual =
403406
404407-- | Lifting of the 'FromJSON' class to unary type constructors.
405408class FromJSON1 f where
406− liftParseJSON :: (Value -> Parser a) -> Value -> Parser (f a)
409+ liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (f a)
410+ liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [f a]
411+ liftParseJSONList f g v = case v of
412+ Array vals -> fmap V.toList (V.mapM (liftParseJSON f g) vals)
413+ _ -> typeMismatch "[a]" v
407414
408415-- | Lift the standard 'parseJSON' function through the type constructor.
409416parseJSON1 :: (FromJSON1 f, FromJSON a) => Value -> Parser (f a)
410−parseJSON1 = liftParseJSON parseJSON
417+parseJSON1 = liftParseJSON parseJSON parseJSONList
411418{-# INLINE parseJSON1 #-}
412419
413420-- | Lifting of the 'ToJSON' class to unary type constructors.
414421class ToJSON1 f where
415− liftToJSON :: (a -> Value) -> f a -> Value
422+ liftToJSON :: (a -> Value) -> ([a] -> Value) -> f a -> Value
423+ liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [f a] -> Value
424+ liftToJSONList f g = listValue (liftToJSON f g)
416425
417− -- | Unfortunately there cannot be default implementation of 'liftToEncoding'.
418− liftToEncoding :: (a -> Encoding) -> f a -> Encoding
426+ -- | Unfortunately there cannot be a default implementation of 'liftToEncoding'.
427+ liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> f a -> Encoding
428+ liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [f a] -> Encoding
429+ liftToEncodingList f g = list (liftToEncoding f g)
419430
420431-- | Lift the standard 'toJSON' function through the type constructor.
421432toJSON1 :: (ToJSON1 f, ToJSON a) => f a -> Value
422−toJSON1 = liftToJSON toJSON
433+toJSON1 = liftToJSON toJSON toJSONList
423434{-# INLINE toJSON1 #-}
424435
425436-- | Lift the standard 'toEncoding' function through the type constructor.
426437toEncoding1 :: (ToJSON1 f, ToJSON a) => f a -> Encoding
427−toEncoding1 = liftToEncoding toEncoding
438+toEncoding1 = liftToEncoding toEncoding toEncodingList
428439{-# INLINE toEncoding1 #-}
429440
430441
@@ -432,26 +443,51 @@ toEncoding1 = liftToEncoding toEncoding
432443class FromJSON2 f where
433444 liftParseJSON2
434445 :: (Value -> Parser a)
446+ -> (Value -> Parser [a])
435447 -> (Value -> Parser b)
448+ -> (Value -> Parser [b])
436449 -> Value -> Parser (f a b)
450+ liftParseJSONList2
451+ :: (Value -> Parser a)
452+ -> (Value -> Parser [a])
453+ -> (Value -> Parser b)
454+ -> (Value -> Parser [b])
455+ -> Value -> Parser [f a b]
456+ liftParseJSONList2 fa ga fb gb v = case v of
457+ Array vals -> fmap V.toList (V.mapM (liftParseJSON2 fa ga fb gb) vals)
458+ _ -> typeMismatch "[a]" v
437459
438460-- | Lift the standard 'parseJSON' function through the type constructor.
439461parseJSON2 :: (FromJSON2 f, FromJSON a, FromJSON b) => Value -> Parser (f a b)
440−parseJSON2 = liftParseJSON2 parseJSON parseJSON
462+parseJSON2 = liftParseJSON2 parseJSON parseJSONList parseJSON parseJSONList
441463{-# INLINE parseJSON2 #-}
442464
443465-- | Lifting of the 'ToJSON' class to binary type constructors.
444466class ToJSON2 f where
445− liftToJSON2 :: (a -> Value) -> (b -> Value) -> f a b -> Value
467+ liftToJSON2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> f a b -> Value
468+ liftToJSONList2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> [f a b] -> Value
469+ liftToJSONList2 fa ga fb gb = listValue (liftToJSON2 fa ga fb gb)
446470
447− liftToEncoding2 :: (a -> Encoding) -> (b -> Encoding) -> f a b -> Encoding
471+ liftToEncoding2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> f a b -> Encoding
472+ liftToEncodingList2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> [f a b] -> Encoding
473+ liftToEncodingList2 fa ga fb gb = list (liftToEncoding2 fa ga fb gb)
448474
449475-- | Lift the standard 'toJSON' function through the type constructor.
450476toJSON2 :: (ToJSON2 f, ToJSON a, ToJSON b) => f a b -> Value
451−toJSON2 = liftToJSON2 toJSON toJSON
477+toJSON2 = liftToJSON2 toJSON toJSONList toJSON toJSONList
452478{-# INLINE toJSON2 #-}
453479
454480-- | Lift the standard 'toEncoding' function through the type constructor.
455481toEncoding2 :: (ToJSON2 f, ToJSON a, ToJSON b) => f a b -> Encoding
456−toEncoding2 = liftToEncoding2 toEncoding toEncoding
482+toEncoding2 = liftToEncoding2 toEncoding toEncodingList toEncoding toEncodingList
457483{-# INLINE toEncoding2 #-}
484+
485+list :: (a -> Encoding) -> [a] -> Encoding
486+list _ [] = emptyArray_
487+list to (x:xs) = Encoding $
488+ B.char7 '[' <> fromEncoding (to x) <> commas xs <> B.char7 ']'
489+ where commas = foldr (\v vs -> B.char7 ',' <> fromEncoding (to v) <> vs) mempty
490+{-# INLINE list #-}
491+
492+listValue :: (a -> Value) -> [a] -> Value
493+listValue f = Array . V.fromList . map f
Data/Aeson/Types/Instances.hs+42−43
@@ -176,10 +176,10 @@ toJSONPair keySerialiser (a, b) = Array $ V.create $ do
176176 return mv
177177
178178instance ToJSON1 Identity where
179− liftToJSON to (Identity a) = to a
179+ liftToJSON to _ (Identity a) = to a
180180 {-# INLINE liftToJSON #-}
181181
182− liftToEncoding to (Identity a) = to a
182+ liftToEncoding to _ (Identity a) = to a
183183 {-# INLINE liftToEncoding #-}
184184
185185instance (ToJSON a) => ToJSON (Identity a) where
@@ -190,7 +190,7 @@ instance (ToJSON a) => ToJSON (Identity a) where
190190 {-# INLINE toEncoding #-}
191191
192192instance FromJSON1 Identity where
193− liftParseJSON p a = Identity <$> p a
193+ liftParseJSON p _ a = Identity <$> p a
194194 {-# INLINE liftParseJSON #-}
195195
196196instance (FromJSON a) => FromJSON (Identity a) where
@@ -199,12 +199,12 @@ instance (FromJSON a) => FromJSON (Identity a) where
199199
200200
201201instance ToJSON1 Maybe where
202− liftToJSON to (Just a) = to a
203− liftToJSON _ Nothing = Null
202+ liftToJSON to _ (Just a) = to a
203+ liftToJSON _ _ Nothing = Null
204204 {-# INLINE liftToJSON #-}
205205
206− liftToEncoding to (Just a) = to a
207− liftToEncoding _ Nothing = Encoding E.null_
206+ liftToEncoding to _ (Just a) = to a
207+ liftToEncoding _ _ Nothing = Encoding E.null_
208208 {-# INLINE liftToEncoding #-}
209209
210210instance (ToJSON a) => ToJSON (Maybe a) where
@@ -215,8 +215,8 @@ instance (ToJSON a) => ToJSON (Maybe a) where
215215 {-# INLINE toEncoding #-}
216216
217217instance FromJSON1 Maybe where
218− liftParseJSON _ Null = pure Nothing
219− liftParseJSON p a = Just <$> p a
218+ liftParseJSON _ _ Null = pure Nothing
219+ liftParseJSON p _ a = Just <$> p a
220220 {-# INLINE liftParseJSON #-}
221221
222222instance (FromJSON a) => FromJSON (Maybe a) where
@@ -225,26 +225,26 @@ instance (FromJSON a) => FromJSON (Maybe a) where
225225
226226
227227instance ToJSON2 Either where
228− liftToJSON2 toA _toB (Left a) = Object $ H.singleton left (toA a)
229− liftToJSON2 _toA toB (Right b) = Object $ H.singleton right (toB b)
228+ liftToJSON2 toA _ _toB _ (Left a) = Object $ H.singleton left (toA a)
229+ liftToJSON2 _toA _ toB _ (Right b) = Object $ H.singleton right (toB b)
230230 {-# INLINE liftToJSON2 #-}
231231
232− liftToEncoding2 toA _toB (Left a) =
232+ liftToEncoding2 toA _ _toB _ (Left a) =
233233 Encoding (B.shortByteString "{\"Left\":")
234234 <> toA a
235235 <> Encoding (B.char7 '}')
236236
237− liftToEncoding2 _toA toB (Right b) =
237+ liftToEncoding2 _toA _ toB _ (Right b) =
238238 Encoding (B.shortByteString "{\"Right\":")
239239 <> toB b
240240 <> Encoding (B.char7 '}')
241241 {-# INLINE liftToEncoding2 #-}
242242
243243instance (ToJSON a) => ToJSON1 (Either a) where
244− liftToJSON = liftToJSON2 toJSON
244+ liftToJSON = liftToJSON2 toJSON toJSONList
245245 {-# INLINE liftToJSON #-}
246246
247− liftToEncoding = liftToEncoding2 toEncoding
247+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
248248 {-# INLINE liftToEncoding #-}
249249
250250instance (ToJSON a, ToJSON b) => ToJSON (Either a b) where
@@ -255,18 +255,18 @@ instance (ToJSON a, ToJSON b) => ToJSON (Either a b) where
255255 {-# INLINE toEncoding #-}
256256
257257instance FromJSON2 Either where
258− liftParseJSON2 pA pB (Object (H.toList -> [(key, value)]))
258+ liftParseJSON2 pA _ pB _ (Object (H.toList -> [(key, value)]))
259259 | key == left = Left <$> pA value <?> Key left
260260 | key == right = Right <$> pB value <?> Key right
261261
262− liftParseJSON2 _ _ _ = fail $
262+ liftParseJSON2 _ _ _ _ _ = fail $
263263 "expected an object with a single property " ++
264264 "where the property key should be either " ++
265265 "\"Left\" or \"Right\""
266266 {-# INLINE liftParseJSON2 #-}
267267
268268instance (FromJSON a) => FromJSON1 (Either a) where
269− liftParseJSON = liftParseJSON2 parseJSON
269+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
270270 {-# INLINE liftParseJSON #-}
271271
272272instance (FromJSON a, FromJSON b) => FromJSON (Either a b) where
@@ -587,10 +587,10 @@ instance FromJSON LT.Text where
587587 {-# INLINE parseJSON #-}
588588
589589instance ToJSON1 NonEmpty where
590− liftToJSON to = liftToJSON to . toList
590+ liftToJSON to _ = listValue to . toList
591591 {-# INLINE liftToJSON #-}
592592
593− liftToEncoding = foldable
593+ liftToEncoding to _ = foldable to
594594 {-# INLINE liftToEncoding #-}
595595
596596instance (ToJSON a) => ToJSON (NonEmpty a) where
@@ -601,7 +601,7 @@ instance (ToJSON a) => ToJSON (NonEmpty a) where
601601 {-# INLINE toEncoding #-}
602602
603603instance FromJSON1 NonEmpty where
604− liftParseJSON p = withArray "NonEmpty a" $
604+ liftParseJSON p _ = withArray "NonEmpty a" $
605605 (>>= ne) . Tr.sequence . zipWith (parseIndexedJSON' p) [0..] . V.toList
606606 where
607607 ne [] = fail "Expected a NonEmpty but got an empty list"
@@ -612,10 +612,10 @@ instance (FromJSON a) => FromJSON (NonEmpty a) where
612612 parseJSON = parseJSON1
613613
614614instance ToJSON1 [] where
615− liftToJSON to = Array . V.fromList . map to
615+ liftToJSON _ to' = to'
616616 {-# INLINE liftToJSON #-}
617617
618− liftToEncoding = list
618+ liftToEncoding _ to' = to'
619619 {-# INLINE liftToEncoding #-}
620620
621621instance (ToJSON a) => ToJSON [a] where
@@ -626,8 +626,7 @@ instance (ToJSON a) => ToJSON [a] where
626626 {-# INLINE toEncoding #-}
627627
628628instance FromJSON1 [] where
629− liftParseJSON p = withArray "[a]" $
630− Tr.sequence . zipWith (parseIndexedJSON' p) [0..] . V.toList
629+ liftParseJSON _ p' = p'
631630 {-# INLINE liftParseJSON #-}
632631
633632instance (FromJSON a) => FromJSON [a] where
@@ -635,10 +634,10 @@ instance (FromJSON a) => FromJSON [a] where
635634 {-# INLINE parseJSON #-}
636635
637636instance ToJSON1 Seq.Seq where
638− liftToJSON to = liftToJSON to . toList
637+ liftToJSON to _ = listValue to . toList
639638 {-# INLINE liftToJSON #-}
640639
641− liftToEncoding = foldable
640+ liftToEncoding to _ = foldable to
642641 {-# INLINE liftToEncoding #-}
643642
644643instance (ToJSON a) => ToJSON (Seq.Seq a) where
@@ -649,7 +648,7 @@ instance (ToJSON a) => ToJSON (Seq.Seq a) where
649648 {-# INLINE toEncoding #-}
650649
651650instance FromJSON1 Seq.Seq where
652− liftParseJSON p = withArray "Seq a" $
651+ liftParseJSON p _ = withArray "Seq a" $
653652 fmap Seq.fromList .
654653 Tr.sequence . zipWith (parseIndexedJSON' p) [0..] . V.toList
655654 {-# INLINE liftParseJSON #-}
@@ -659,10 +658,10 @@ instance (FromJSON a) => FromJSON (Seq.Seq a) where
659658 {-# INLINE parseJSON #-}
660659
661660instance ToJSON1 Vector where
662− liftToJSON to = Array . V.map to
661+ liftToJSON to _ = Array . V.map to
663662 {-# INLINE liftToJSON #-}
664663
665− liftToEncoding to xs
664+ liftToEncoding to _ xs
666665 | V.null xs = E.emptyArray_
667666 | otherwise = Encoding $
668667 B.char7 '[' <> fromEncoding (to (V.unsafeHead xs)) <>
@@ -688,7 +687,7 @@ encodeVector xs
688687{-# INLINE encodeVector #-}
689688
690689instance FromJSON1 Vector where
691− liftParseJSON p = withArray "Vector a" $
690+ liftParseJSON p _ = withArray "Vector a" $
692691 V.mapM (uncurry $ parseIndexedJSON' p) . V.indexed
693692 {-# INLINE liftParseJSON #-}
694693
@@ -980,10 +979,10 @@ instance FromJSON NominalDiffTime where
980979 {-# INLINE parseJSON #-}
981980
982981instance ToJSON1 Dual where
983− liftToJSON to = to . getDual
982+ liftToJSON to _ = to . getDual
984983 {-# INLINE liftToJSON #-}
985984
986− liftToEncoding to = to . getDual
985+ liftToEncoding to _ = to . getDual
987986 {-# INLINE liftToEncoding #-}
988987
989988instance ToJSON a => ToJSON (Dual a) where
@@ -994,7 +993,7 @@ instance ToJSON a => ToJSON (Dual a) where
994993 {-# INLINE toEncoding #-}
995994
996995instance FromJSON1 Dual where
997− liftParseJSON p = fmap Dual . p
996+ liftParseJSON p _ = fmap Dual . p
998997 {-# INLINE liftParseJSON #-}
999998
1000999instance FromJSON a => FromJSON (Dual a) where
@@ -1003,10 +1002,10 @@ instance FromJSON a => FromJSON (Dual a) where
10031002
10041003
10051004instance ToJSON1 First where
1006− liftToJSON to = liftToJSON to . getFirst
1005+ liftToJSON to to' = liftToJSON to to' . getFirst
10071006 {-# INLINE liftToJSON #-}
10081007
1009− liftToEncoding to = liftToEncoding to . getFirst
1008+ liftToEncoding to to' = liftToEncoding to to' . getFirst
10101009 {-# INLINE liftToEncoding #-}
10111010
10121011instance ToJSON a => ToJSON (First a) where
@@ -1017,7 +1016,7 @@ instance ToJSON a => ToJSON (First a) where
10171016 {-# INLINE toEncoding #-}
10181017
10191018instance FromJSON1 First where
1020− liftParseJSON p = fmap First . liftParseJSON p
1019+ liftParseJSON p p' = fmap First . liftParseJSON p p'
10211020 {-# INLINE liftParseJSON #-}
10221021
10231022instance FromJSON a => FromJSON (First a) where
@@ -1026,10 +1025,10 @@ instance FromJSON a => FromJSON (First a) where
10261025
10271026
10281027instance ToJSON1 Last where
1029− liftToJSON to = liftToJSON to . getLast
1028+ liftToJSON to to' = liftToJSON to to' . getLast
10301029 {-# INLINE liftToJSON #-}
10311030
1032− liftToEncoding to = liftToEncoding to . getLast
1031+ liftToEncoding to to' = liftToEncoding to to' . getLast
10331032 {-# INLINE liftToEncoding #-}
10341033
10351034instance ToJSON a => ToJSON (Last a) where
@@ -1040,7 +1039,7 @@ instance ToJSON a => ToJSON (Last a) where
10401039 {-# INLINE toEncoding #-}
10411040
10421041instance FromJSON1 Last where
1043− liftParseJSON p = fmap Last . liftParseJSON p
1042+ liftParseJSON p p' = fmap Last . liftParseJSON p p'
10441043 {-# INLINE liftParseJSON #-}
10451044
10461045instance FromJSON a => FromJSON (Last a) where
@@ -1076,10 +1075,10 @@ instance FromJSON (Proxy a) where
10761075 parseJSON v = typeMismatch "Proxy" v
10771076
10781077instance ToJSON1 (Tagged a) where
1079− liftToJSON to (Tagged x) = to x
1078+ liftToJSON to _ (Tagged x) = to x
10801079 {-# INLINE liftToJSON #-}
10811080
1082− liftToEncoding to (Tagged x) = to x
1081+ liftToEncoding to _ (Tagged x) = to x
10831082 {-# INLINE liftToEncoding #-}
10841083
10851084instance ToJSON b => ToJSON (Tagged a b) where
@@ -1090,7 +1089,7 @@ instance ToJSON b => ToJSON (Tagged a b) where
10901089 {-# INLINE toEncoding #-}
10911090
10921091instance FromJSON1 (Tagged a) where
1093− liftParseJSON p = fmap Tagged . p
1092+ liftParseJSON p _ = fmap Tagged . p
10941093 {-# INLINE liftParseJSON #-}
10951094
10961095instance FromJSON b => FromJSON (Tagged a b) where
Data/Aeson/Types/Instances/Tuple.hs+86−84
@@ -49,22 +49,22 @@ withArray expected _ v = typeMismatch expected v
4949-------------------------------------------------------------------------------
5050
5151instance ToJSON2 ((,) ) where
52− liftToJSON2 toA toB (a, b) = Array $ V.create $ do
52+ liftToJSON2 toA _ toB _ (a, b) = Array $ V.create $ do
5353 mv <- VM.unsafeNew 2
5454 VM.unsafeWrite mv 0 (toA a)
5555 VM.unsafeWrite mv 1 (toB b)
5656 return mv
5757 {-# INLINE liftToJSON2 #-}
5858
59− liftToEncoding2 toA toB (a, b) = tuple $
59+ liftToEncoding2 toA _ toB _ (a, b) = tuple $
6060 fromEncoding (toA a) >*<
6161 fromEncoding (toB b)
6262 {-# INLINE liftToEncoding2 #-}
6363
6464instance (ToJSON a) => ToJSON1 ((,) a) where
65− liftToJSON = liftToJSON2 toJSON
65+ liftToJSON = liftToJSON2 toJSON toJSONList
6666 {-# INLINE liftToJSON #-}
67− liftToEncoding = liftToEncoding2 toEncoding
67+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
6868 {-# INLINE liftToEncoding #-}
6969
7070instance (ToJSON a, ToJSON b) => ToJSON (a, b) where
@@ -74,7 +74,7 @@ instance (ToJSON a, ToJSON b) => ToJSON (a, b) where
7474 {-# INLINE toEncoding #-}
7575
7676instance FromJSON2 ((,) ) where
77− liftParseJSON2 pA pB = withArray "(a, b)" $ \t ->
77+ liftParseJSON2 pA _ pB _ = withArray "(a, b)" $ \t ->
7878 let n = V.length t
7979 in if n == 2
8080 then (,)
@@ -84,7 +84,7 @@ instance FromJSON2 ((,) ) where
8484 {-# INLINE liftParseJSON2 #-}
8585
8686instance (FromJSON a) => FromJSON1 ((,) a) where
87− liftParseJSON = liftParseJSON2 parseJSON
87+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
8888 {-# INLINE liftParseJSON #-}
8989
9090instance (FromJSON a, FromJSON b) => FromJSON (a, b) where
@@ -93,7 +93,7 @@ instance (FromJSON a, FromJSON b) => FromJSON (a, b) where
9393
9494
9595instance (ToJSON a) => ToJSON2 ((,,) a) where
96− liftToJSON2 toB toC (a, b, c) = Array $ V.create $ do
96+ liftToJSON2 toB _ toC _ (a, b, c) = Array $ V.create $ do
9797 mv <- VM.unsafeNew 3
9898 VM.unsafeWrite mv 0 (toJSON a)
9999 VM.unsafeWrite mv 1 (toB b)
@@ -101,16 +101,16 @@ instance (ToJSON a) => ToJSON2 ((,,) a) where
101101 return mv
102102 {-# INLINE liftToJSON2 #-}
103103
104− liftToEncoding2 toB toC (a, b, c) = tuple $
104+ liftToEncoding2 toB _ toC _ (a, b, c) = tuple $
105105 builder a >*<
106106 fromEncoding (toB b) >*<
107107 fromEncoding (toC c)
108108 {-# INLINE liftToEncoding2 #-}
109109
110110instance (ToJSON a, ToJSON b) => ToJSON1 ((,,) a b) where
111− liftToJSON = liftToJSON2 toJSON
111+ liftToJSON = liftToJSON2 toJSON toJSONList
112112 {-# INLINE liftToJSON #-}
113− liftToEncoding = liftToEncoding2 toEncoding
113+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
114114 {-# INLINE liftToEncoding #-}
115115
116116instance (ToJSON a, ToJSON b, ToJSON c) => ToJSON (a, b, c) where
@@ -120,7 +120,7 @@ instance (ToJSON a, ToJSON b, ToJSON c) => ToJSON (a, b, c) where
120120 {-# INLINE toEncoding #-}
121121
122122instance (FromJSON a) => FromJSON2 ((,,) a) where
123− liftParseJSON2 pB pC = withArray "(a, b, c)" $ \t ->
123+ liftParseJSON2 pB _ pC _ = withArray "(a, b, c)" $ \t ->
124124 let n = V.length t
125125 in if n == 3
126126 then (,,)
@@ -131,7 +131,7 @@ instance (FromJSON a) => FromJSON2 ((,,) a) where
131131 {-# INLINE liftParseJSON2 #-}
132132
133133instance (FromJSON a, FromJSON b) => FromJSON1 ((,,) a b) where
134− liftParseJSON = liftParseJSON2 parseJSON
134+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
135135 {-# INLINE liftParseJSON #-}
136136
137137instance (FromJSON a, FromJSON b, FromJSON c) => FromJSON (a, b, c) where
@@ -140,7 +140,7 @@ instance (FromJSON a, FromJSON b, FromJSON c) => FromJSON (a, b, c) where
140140
141141
142142instance (ToJSON a, ToJSON b) => ToJSON2 ((,,,) a b) where
143− liftToJSON2 toC toD (a, b, c, d) = Array $ V.create $ do
143+ liftToJSON2 toC _ toD _ (a, b, c, d) = Array $ V.create $ do
144144 mv <- VM.unsafeNew 4
145145 VM.unsafeWrite mv 0 (toJSON a)
146146 VM.unsafeWrite mv 1 (toJSON b)
@@ -149,7 +149,7 @@ instance (ToJSON a, ToJSON b) => ToJSON2 ((,,,) a b) where
149149 return mv
150150 {-# INLINE liftToJSON2 #-}
151151
152− liftToEncoding2 toC toD (a, b, c, d) = tuple $
152+ liftToEncoding2 toC _ toD _ (a, b, c, d) = tuple $
153153 builder a >*<
154154 builder b >*<
155155 fromEncoding (toC c) >*<
@@ -157,9 +157,9 @@ instance (ToJSON a, ToJSON b) => ToJSON2 ((,,,) a b) where
157157 {-# INLINE liftToEncoding2 #-}
158158
159159instance (ToJSON a, ToJSON b, ToJSON c) => ToJSON1 ((,,,) a b c) where
160− liftToJSON = liftToJSON2 toJSON
160+ liftToJSON = liftToJSON2 toJSON toJSONList
161161 {-# INLINE liftToJSON #-}
162− liftToEncoding = liftToEncoding2 toEncoding
162+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
163163 {-# INLINE liftToEncoding #-}
164164
165165instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON (a, b, c, d) where
@@ -169,7 +169,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON (a, b, c, d) where
169169 {-# INLINE toEncoding #-}
170170
171171instance (FromJSON a, FromJSON b) => FromJSON2 ((,,,) a b) where
172− liftParseJSON2 pC pD = withArray "(a, b, c, d)" $ \t ->
172+ liftParseJSON2 pC _ pD _ = withArray "(a, b, c, d)" $ \t ->
173173 let n = V.length t
174174 in if n == 4
175175 then (,,,)
@@ -181,7 +181,7 @@ instance (FromJSON a, FromJSON b) => FromJSON2 ((,,,) a b) where
181181 {-# INLINE liftParseJSON2 #-}
182182
183183instance (FromJSON a, FromJSON b, FromJSON c) => FromJSON1 ((,,,) a b c) where
184− liftParseJSON = liftParseJSON2 parseJSON
184+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
185185 {-# INLINE liftParseJSON #-}
186186
187187instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d) => FromJSON (a, b, c, d) where
@@ -190,7 +190,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d) => FromJSON (a, b, c,
190190
191191
192192instance (ToJSON a, ToJSON b, ToJSON c) => ToJSON2 ((,,,,) a b c) where
193− liftToJSON2 toD toE (a, b, c, d, e) = Array $ V.create $ do
193+ liftToJSON2 toD _ toE _ (a, b, c, d, e) = Array $ V.create $ do
194194 mv <- VM.unsafeNew 5
195195 VM.unsafeWrite mv 0 (toJSON a)
196196 VM.unsafeWrite mv 1 (toJSON b)
@@ -200,7 +200,7 @@ instance (ToJSON a, ToJSON b, ToJSON c) => ToJSON2 ((,,,,) a b c) where
200200 return mv
201201 {-# INLINE liftToJSON2 #-}
202202
203− liftToEncoding2 toD toE (a, b, c, d, e) = tuple $
203+ liftToEncoding2 toD _ toE _ (a, b, c, d, e) = tuple $
204204 builder a >*<
205205 builder b >*<
206206 builder c >*<
@@ -209,9 +209,9 @@ instance (ToJSON a, ToJSON b, ToJSON c) => ToJSON2 ((,,,,) a b c) where
209209 {-# INLINE liftToEncoding2 #-}
210210
211211instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON1 ((,,,,) a b c d) where
212− liftToJSON = liftToJSON2 toJSON
212+ liftToJSON = liftToJSON2 toJSON toJSONList
213213 {-# INLINE liftToJSON #-}
214− liftToEncoding = liftToEncoding2 toEncoding
214+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
215215 {-# INLINE liftToEncoding #-}
216216
217217instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON (a, b, c, d, e) where
@@ -221,7 +221,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON (a, b, c,
221221 {-# INLINE toEncoding #-}
222222
223223instance (FromJSON a, FromJSON b, FromJSON c) => FromJSON2 ((,,,,) a b c) where
224− liftParseJSON2 pD pE = withArray "(a, b, c, d, e)" $ \t ->
224+ liftParseJSON2 pD _ pE _ = withArray "(a, b, c, d, e)" $ \t ->
225225 let n = V.length t
226226 in if n == 5
227227 then (,,,,)
@@ -234,7 +234,7 @@ instance (FromJSON a, FromJSON b, FromJSON c) => FromJSON2 ((,,,,) a b c) where
234234 {-# INLINE liftParseJSON2 #-}
235235
236236instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d) => FromJSON1 ((,,,,) a b c d) where
237− liftParseJSON = liftParseJSON2 parseJSON
237+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
238238 {-# INLINE liftParseJSON #-}
239239
240240instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e) => FromJSON (a, b, c, d, e) where
@@ -243,7 +243,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e) => FromJSO
243243
244244
245245instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON2 ((,,,,,) a b c d) where
246− liftToJSON2 toE toF (a, b, c, d, e, f) = Array $ V.create $ do
246+ liftToJSON2 toE _ toF _ (a, b, c, d, e, f) = Array $ V.create $ do
247247 mv <- VM.unsafeNew 6
248248 VM.unsafeWrite mv 0 (toJSON a)
249249 VM.unsafeWrite mv 1 (toJSON b)
@@ -254,7 +254,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON2 ((,,,,,) a b c d) w
254254 return mv
255255 {-# INLINE liftToJSON2 #-}
256256
257− liftToEncoding2 toE toF (a, b, c, d, e, f) = tuple $
257+ liftToEncoding2 toE _ toF _ (a, b, c, d, e, f) = tuple $
258258 builder a >*<
259259 builder b >*<
260260 builder c >*<
@@ -264,9 +264,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON2 ((,,,,,) a b c d) w
264264 {-# INLINE liftToEncoding2 #-}
265265
266266instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON1 ((,,,,,) a b c d e) where
267− liftToJSON = liftToJSON2 toJSON
267+ liftToJSON = liftToJSON2 toJSON toJSONList
268268 {-# INLINE liftToJSON #-}
269− liftToEncoding = liftToEncoding2 toEncoding
269+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
270270 {-# INLINE liftToEncoding #-}
271271
272272instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON (a, b, c, d, e, f) where
@@ -276,7 +276,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON
276276 {-# INLINE toEncoding #-}
277277
278278instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d) => FromJSON2 ((,,,,,) a b c d) where
279− liftParseJSON2 pE pF = withArray "(a, b, c, d, e, f)" $ \t ->
279+ liftParseJSON2 pE _ pF _ = withArray "(a, b, c, d, e, f)" $ \t ->
280280 let n = V.length t
281281 in if n == 6
282282 then (,,,,,)
@@ -290,7 +290,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d) => FromJSON2 ((,,,,,)
290290 {-# INLINE liftParseJSON2 #-}
291291
292292instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e) => FromJSON1 ((,,,,,) a b c d e) where
293− liftParseJSON = liftParseJSON2 parseJSON
293+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
294294 {-# INLINE liftParseJSON #-}
295295
296296instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f) => FromJSON (a, b, c, d, e, f) where
@@ -299,7 +299,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
299299
300300
301301instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON2 ((,,,,,,) a b c d e) where
302− liftToJSON2 toF toG (a, b, c, d, e, f, g) = Array $ V.create $ do
302+ liftToJSON2 toF _ toG _ (a, b, c, d, e, f, g) = Array $ V.create $ do
303303 mv <- VM.unsafeNew 7
304304 VM.unsafeWrite mv 0 (toJSON a)
305305 VM.unsafeWrite mv 1 (toJSON b)
@@ -311,7 +311,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON2 ((,,,,,,)
311311 return mv
312312 {-# INLINE liftToJSON2 #-}
313313
314− liftToEncoding2 toF toG (a, b, c, d, e, f, g) = tuple $
314+ liftToEncoding2 toF _ toG _ (a, b, c, d, e, f, g) = tuple $
315315 builder a >*<
316316 builder b >*<
317317 builder c >*<
@@ -322,9 +322,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON2 ((,,,,,,)
322322 {-# INLINE liftToEncoding2 #-}
323323
324324instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON1 ((,,,,,,) a b c d e f) where
325− liftToJSON = liftToJSON2 toJSON
325+ liftToJSON = liftToJSON2 toJSON toJSONList
326326 {-# INLINE liftToJSON #-}
327− liftToEncoding = liftToEncoding2 toEncoding
327+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
328328 {-# INLINE liftToEncoding #-}
329329
330330instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) => ToJSON (a, b, c, d, e, f, g) where
@@ -334,7 +334,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g)
334334 {-# INLINE toEncoding #-}
335335
336336instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e) => FromJSON2 ((,,,,,,) a b c d e) where
337− liftParseJSON2 pF pG = withArray "(a, b, c, d, e, f, g)" $ \t ->
337+ liftParseJSON2 pF _ pG _ = withArray "(a, b, c, d, e, f, g)" $ \t ->
338338 let n = V.length t
339339 in if n == 7
340340 then (,,,,,,)
@@ -349,7 +349,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e) => FromJSO
349349 {-# INLINE liftParseJSON2 #-}
350350
351351instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f) => FromJSON1 ((,,,,,,) a b c d e f) where
352− liftParseJSON = liftParseJSON2 parseJSON
352+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
353353 {-# INLINE liftParseJSON #-}
354354
355355instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g) => FromJSON (a, b, c, d, e, f, g) where
@@ -358,7 +358,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
358358
359359
360360instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON2 ((,,,,,,,) a b c d e f) where
361− liftToJSON2 toG toH (a, b, c, d, e, f, g, h) = Array $ V.create $ do
361+ liftToJSON2 toG _ toH _ (a, b, c, d, e, f, g, h) = Array $ V.create $ do
362362 mv <- VM.unsafeNew 8
363363 VM.unsafeWrite mv 0 (toJSON a)
364364 VM.unsafeWrite mv 1 (toJSON b)
@@ -371,7 +371,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON2
371371 return mv
372372 {-# INLINE liftToJSON2 #-}
373373
374− liftToEncoding2 toG toH (a, b, c, d, e, f, g, h) = tuple $
374+ liftToEncoding2 toG _ toH _ (a, b, c, d, e, f, g, h) = tuple $
375375 builder a >*<
376376 builder b >*<
377377 builder c >*<
@@ -383,9 +383,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON2
383383 {-# INLINE liftToEncoding2 #-}
384384
385385instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) => ToJSON1 ((,,,,,,,) a b c d e f g) where
386− liftToJSON = liftToJSON2 toJSON
386+ liftToJSON = liftToJSON2 toJSON toJSONList
387387 {-# INLINE liftToJSON #-}
388− liftToEncoding = liftToEncoding2 toEncoding
388+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
389389 {-# INLINE liftToEncoding #-}
390390
391391instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) => ToJSON (a, b, c, d, e, f, g, h) where
@@ -395,7 +395,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
395395 {-# INLINE toEncoding #-}
396396
397397instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f) => FromJSON2 ((,,,,,,,) a b c d e f) where
398− liftParseJSON2 pG pH = withArray "(a, b, c, d, e, f, g, h)" $ \t ->
398+ liftParseJSON2 pG _ pH _ = withArray "(a, b, c, d, e, f, g, h)" $ \t ->
399399 let n = V.length t
400400 in if n == 8
401401 then (,,,,,,,)
@@ -411,7 +411,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
411411 {-# INLINE liftParseJSON2 #-}
412412
413413instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g) => FromJSON1 ((,,,,,,,) a b c d e f g) where
414− liftParseJSON = liftParseJSON2 parseJSON
414+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
415415 {-# INLINE liftParseJSON #-}
416416
417417instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h) => FromJSON (a, b, c, d, e, f, g, h) where
@@ -420,7 +420,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
420420
421421
422422instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) => ToJSON2 ((,,,,,,,,) a b c d e f g) where
423− liftToJSON2 toH toI (a, b, c, d, e, f, g, h, i) = Array $ V.create $ do
423+ liftToJSON2 toH _ toI _ (a, b, c, d, e, f, g, h, i) = Array $ V.create $ do
424424 mv <- VM.unsafeNew 9
425425 VM.unsafeWrite mv 0 (toJSON a)
426426 VM.unsafeWrite mv 1 (toJSON b)
@@ -434,7 +434,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g)
434434 return mv
435435 {-# INLINE liftToJSON2 #-}
436436
437− liftToEncoding2 toH toI (a, b, c, d, e, f, g, h, i) = tuple $
437+ liftToEncoding2 toH _ toI _ (a, b, c, d, e, f, g, h, i) = tuple $
438438 builder a >*<
439439 builder b >*<
440440 builder c >*<
@@ -447,9 +447,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g)
447447 {-# INLINE liftToEncoding2 #-}
448448
449449instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) => ToJSON1 ((,,,,,,,,) a b c d e f g h) where
450− liftToJSON = liftToJSON2 toJSON
450+ liftToJSON = liftToJSON2 toJSON toJSONList
451451 {-# INLINE liftToJSON #-}
452− liftToEncoding = liftToEncoding2 toEncoding
452+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
453453 {-# INLINE liftToEncoding #-}
454454
455455instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) => ToJSON (a, b, c, d, e, f, g, h, i) where
@@ -459,7 +459,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
459459 {-# INLINE toEncoding #-}
460460
461461instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g) => FromJSON2 ((,,,,,,,,) a b c d e f g) where
462− liftParseJSON2 pH pI = withArray "(a, b, c, d, e, f, g, h, i)" $ \t ->
462+ liftParseJSON2 pH _ pI _ = withArray "(a, b, c, d, e, f, g, h, i)" $ \t ->
463463 let n = V.length t
464464 in if n == 9
465465 then (,,,,,,,,)
@@ -476,7 +476,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
476476 {-# INLINE liftParseJSON2 #-}
477477
478478instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h) => FromJSON1 ((,,,,,,,,) a b c d e f g h) where
479− liftParseJSON = liftParseJSON2 parseJSON
479+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
480480 {-# INLINE liftParseJSON #-}
481481
482482instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i) => FromJSON (a, b, c, d, e, f, g, h, i) where
@@ -485,7 +485,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
485485
486486
487487instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) => ToJSON2 ((,,,,,,,,,) a b c d e f g h) where
488− liftToJSON2 toI toJ (a, b, c, d, e, f, g, h, i, j) = Array $ V.create $ do
488+ liftToJSON2 toI _ toJ _ (a, b, c, d, e, f, g, h, i, j) = Array $ V.create $ do
489489 mv <- VM.unsafeNew 10
490490 VM.unsafeWrite mv 0 (toJSON a)
491491 VM.unsafeWrite mv 1 (toJSON b)
@@ -500,7 +500,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
500500 return mv
501501 {-# INLINE liftToJSON2 #-}
502502
503− liftToEncoding2 toI toJ (a, b, c, d, e, f, g, h, i, j) = tuple $
503+ liftToEncoding2 toI _ toJ _ (a, b, c, d, e, f, g, h, i, j) = tuple $
504504 builder a >*<
505505 builder b >*<
506506 builder c >*<
@@ -514,9 +514,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
514514 {-# INLINE liftToEncoding2 #-}
515515
516516instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) => ToJSON1 ((,,,,,,,,,) a b c d e f g h i) where
517− liftToJSON = liftToJSON2 toJSON
517+ liftToJSON = liftToJSON2 toJSON toJSONList
518518 {-# INLINE liftToJSON #-}
519− liftToEncoding = liftToEncoding2 toEncoding
519+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
520520 {-# INLINE liftToEncoding #-}
521521
522522instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) => ToJSON (a, b, c, d, e, f, g, h, i, j) where
@@ -526,7 +526,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
526526 {-# INLINE toEncoding #-}
527527
528528instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h) => FromJSON2 ((,,,,,,,,,) a b c d e f g h) where
529− liftParseJSON2 pI pJ = withArray "(a, b, c, d, e, f, g, h, i, j)" $ \t ->
529+ liftParseJSON2 pI _ pJ _ = withArray "(a, b, c, d, e, f, g, h, i, j)" $ \t ->
530530 let n = V.length t
531531 in if n == 10
532532 then (,,,,,,,,,)
@@ -544,7 +544,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
544544 {-# INLINE liftParseJSON2 #-}
545545
546546instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i) => FromJSON1 ((,,,,,,,,,) a b c d e f g h i) where
547− liftParseJSON = liftParseJSON2 parseJSON
547+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
548548 {-# INLINE liftParseJSON #-}
549549
550550instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j) => FromJSON (a, b, c, d, e, f, g, h, i, j) where
@@ -553,7 +553,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
553553
554554
555555instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) => ToJSON2 ((,,,,,,,,,,) a b c d e f g h i) where
556− liftToJSON2 toJ toK (a, b, c, d, e, f, g, h, i, j, k) = Array $ V.create $ do
556+ liftToJSON2 toJ _ toK _ (a, b, c, d, e, f, g, h, i, j, k) = Array $ V.create $ do
557557 mv <- VM.unsafeNew 11
558558 VM.unsafeWrite mv 0 (toJSON a)
559559 VM.unsafeWrite mv 1 (toJSON b)
@@ -569,7 +569,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
569569 return mv
570570 {-# INLINE liftToJSON2 #-}
571571
572− liftToEncoding2 toJ toK (a, b, c, d, e, f, g, h, i, j, k) = tuple $
572+ liftToEncoding2 toJ _ toK _ (a, b, c, d, e, f, g, h, i, j, k) = tuple $
573573 builder a >*<
574574 builder b >*<
575575 builder c >*<
@@ -584,9 +584,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
584584 {-# INLINE liftToEncoding2 #-}
585585
586586instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) => ToJSON1 ((,,,,,,,,,,) a b c d e f g h i j) where
587− liftToJSON = liftToJSON2 toJSON
587+ liftToJSON = liftToJSON2 toJSON toJSONList
588588 {-# INLINE liftToJSON #-}
589− liftToEncoding = liftToEncoding2 toEncoding
589+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
590590 {-# INLINE liftToEncoding #-}
591591
592592instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) => ToJSON (a, b, c, d, e, f, g, h, i, j, k) where
@@ -596,7 +596,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
596596 {-# INLINE toEncoding #-}
597597
598598instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i) => FromJSON2 ((,,,,,,,,,,) a b c d e f g h i) where
599− liftParseJSON2 pJ pK = withArray "(a, b, c, d, e, f, g, h, i, j, k)" $ \t ->
599+ liftParseJSON2 pJ _ pK _ = withArray "(a, b, c, d, e, f, g, h, i, j, k)" $ \t ->
600600 let n = V.length t
601601 in if n == 11
602602 then (,,,,,,,,,,)
@@ -615,7 +615,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
615615 {-# INLINE liftParseJSON2 #-}
616616
617617instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j) => FromJSON1 ((,,,,,,,,,,) a b c d e f g h i j) where
618− liftParseJSON = liftParseJSON2 parseJSON
618+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
619619 {-# INLINE liftParseJSON #-}
620620
621621instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k) => FromJSON (a, b, c, d, e, f, g, h, i, j, k) where
@@ -624,7 +624,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
624624
625625
626626instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) => ToJSON2 ((,,,,,,,,,,,) a b c d e f g h i j) where
627− liftToJSON2 toK toL (a, b, c, d, e, f, g, h, i, j, k, l) = Array $ V.create $ do
627+ liftToJSON2 toK _ toL _ (a, b, c, d, e, f, g, h, i, j, k, l) = Array $ V.create $ do
628628 mv <- VM.unsafeNew 12
629629 VM.unsafeWrite mv 0 (toJSON a)
630630 VM.unsafeWrite mv 1 (toJSON b)
@@ -641,7 +641,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
641641 return mv
642642 {-# INLINE liftToJSON2 #-}
643643
644− liftToEncoding2 toK toL (a, b, c, d, e, f, g, h, i, j, k, l) = tuple $
644+ liftToEncoding2 toK _ toL _ (a, b, c, d, e, f, g, h, i, j, k, l) = tuple $
645645 builder a >*<
646646 builder b >*<
647647 builder c >*<
@@ -657,9 +657,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
657657 {-# INLINE liftToEncoding2 #-}
658658
659659instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) => ToJSON1 ((,,,,,,,,,,,) a b c d e f g h i j k) where
660− liftToJSON = liftToJSON2 toJSON
660+ liftToJSON = liftToJSON2 toJSON toJSONList
661661 {-# INLINE liftToJSON #-}
662− liftToEncoding = liftToEncoding2 toEncoding
662+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
663663 {-# INLINE liftToEncoding #-}
664664
665665instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l) where
@@ -669,7 +669,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
669669 {-# INLINE toEncoding #-}
670670
671671instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j) => FromJSON2 ((,,,,,,,,,,,) a b c d e f g h i j) where
672− liftParseJSON2 pK pL = withArray "(a, b, c, d, e, f, g, h, i, j, k, l)" $ \t ->
672+ liftParseJSON2 pK _ pL _ = withArray "(a, b, c, d, e, f, g, h, i, j, k, l)" $ \t ->
673673 let n = V.length t
674674 in if n == 12
675675 then (,,,,,,,,,,,)
@@ -689,7 +689,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
689689 {-# INLINE liftParseJSON2 #-}
690690
691691instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k) => FromJSON1 ((,,,,,,,,,,,) a b c d e f g h i j k) where
692− liftParseJSON = liftParseJSON2 parseJSON
692+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
693693 {-# INLINE liftParseJSON #-}
694694
695695instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l) where
@@ -698,7 +698,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
698698
699699
700700instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) => ToJSON2 ((,,,,,,,,,,,,) a b c d e f g h i j k) where
701− liftToJSON2 toL toM (a, b, c, d, e, f, g, h, i, j, k, l, m) = Array $ V.create $ do
701+ liftToJSON2 toL _ toM _ (a, b, c, d, e, f, g, h, i, j, k, l, m) = Array $ V.create $ do
702702 mv <- VM.unsafeNew 13
703703 VM.unsafeWrite mv 0 (toJSON a)
704704 VM.unsafeWrite mv 1 (toJSON b)
@@ -716,7 +716,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
716716 return mv
717717 {-# INLINE liftToJSON2 #-}
718718
719− liftToEncoding2 toL toM (a, b, c, d, e, f, g, h, i, j, k, l, m) = tuple $
719+ liftToEncoding2 toL _ toM _ (a, b, c, d, e, f, g, h, i, j, k, l, m) = tuple $
720720 builder a >*<
721721 builder b >*<
722722 builder c >*<
@@ -733,9 +733,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
733733 {-# INLINE liftToEncoding2 #-}
734734
735735instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) => ToJSON1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) where
736− liftToJSON = liftToJSON2 toJSON
736+ liftToJSON = liftToJSON2 toJSON toJSONList
737737 {-# INLINE liftToJSON #-}
738− liftToEncoding = liftToEncoding2 toEncoding
738+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
739739 {-# INLINE liftToEncoding #-}
740740
741741instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) where
@@ -745,7 +745,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
745745 {-# INLINE toEncoding #-}
746746
747747instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k) => FromJSON2 ((,,,,,,,,,,,,) a b c d e f g h i j k) where
748− liftParseJSON2 pL pM = withArray "(a, b, c, d, e, f, g, h, i, j, k, l, m)" $ \t ->
748+ liftParseJSON2 pL _ pM _ = withArray "(a, b, c, d, e, f, g, h, i, j, k, l, m)" $ \t ->
749749 let n = V.length t
750750 in if n == 13
751751 then (,,,,,,,,,,,,)
@@ -766,7 +766,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
766766 {-# INLINE liftParseJSON2 #-}
767767
768768instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l) => FromJSON1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) where
769− liftParseJSON = liftParseJSON2 parseJSON
769+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
770770 {-# INLINE liftParseJSON #-}
771771
772772instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) where
@@ -775,7 +775,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
775775
776776
777777instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) => ToJSON2 ((,,,,,,,,,,,,,) a b c d e f g h i j k l) where
778− liftToJSON2 toM toN (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = Array $ V.create $ do
778+ liftToJSON2 toM _ toN _ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = Array $ V.create $ do
779779 mv <- VM.unsafeNew 14
780780 VM.unsafeWrite mv 0 (toJSON a)
781781 VM.unsafeWrite mv 1 (toJSON b)
@@ -794,7 +794,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
794794 return mv
795795 {-# INLINE liftToJSON2 #-}
796796
797− liftToEncoding2 toM toN (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = tuple $
797+ liftToEncoding2 toM _ toN _ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = tuple $
798798 builder a >*<
799799 builder b >*<
800800 builder c >*<
@@ -812,9 +812,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
812812 {-# INLINE liftToEncoding2 #-}
813813
814814instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) => ToJSON1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) where
815− liftToJSON = liftToJSON2 toJSON
815+ liftToJSON = liftToJSON2 toJSON toJSONList
816816 {-# INLINE liftToJSON #-}
817− liftToEncoding = liftToEncoding2 toEncoding
817+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
818818 {-# INLINE liftToEncoding #-}
819819
820820instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) where
@@ -824,7 +824,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
824824 {-# INLINE toEncoding #-}
825825
826826instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l) => FromJSON2 ((,,,,,,,,,,,,,) a b c d e f g h i j k l) where
827− liftParseJSON2 pM pN = withArray "(a, b, c, d, e, f, g, h, i, j, k, l, m, n)" $ \t ->
827+ liftParseJSON2 pM _ pN _ = withArray "(a, b, c, d, e, f, g, h, i, j, k, l, m, n)" $ \t ->
828828 let n = V.length t
829829 in if n == 14
830830 then (,,,,,,,,,,,,,)
@@ -846,7 +846,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
846846 {-# INLINE liftParseJSON2 #-}
847847
848848instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m) => FromJSON1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) where
849− liftParseJSON = liftParseJSON2 parseJSON
849+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
850850 {-# INLINE liftParseJSON #-}
851851
852852instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m, FromJSON n) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) where
@@ -855,7 +855,7 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
855855
856856
857857instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) => ToJSON2 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m) where
858− liftToJSON2 toN toO (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = Array $ V.create $ do
858+ liftToJSON2 toN _ toO _ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = Array $ V.create $ do
859859 mv <- VM.unsafeNew 15
860860 VM.unsafeWrite mv 0 (toJSON a)
861861 VM.unsafeWrite mv 1 (toJSON b)
@@ -875,7 +875,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
875875 return mv
876876 {-# INLINE liftToJSON2 #-}
877877
878− liftToEncoding2 toN toO (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = tuple $
878+ liftToEncoding2 toN _ toO _ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = tuple $
879879 builder a >*<
880880 builder b >*<
881881 builder c >*<
@@ -894,9 +894,9 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
894894 {-# INLINE liftToEncoding2 #-}
895895
896896instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) => ToJSON1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) where
897− liftToJSON = liftToJSON2 toJSON
897+ liftToJSON = liftToJSON2 toJSON toJSONList
898898 {-# INLINE liftToJSON #-}
899− liftToEncoding = liftToEncoding2 toEncoding
899+ liftToEncoding = liftToEncoding2 toEncoding toEncodingList
900900 {-# INLINE liftToEncoding #-}
901901
902902instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n, ToJSON o) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) where
@@ -906,7 +906,7 @@ instance (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g,
906906 {-# INLINE toEncoding #-}
907907
908908instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m) => FromJSON2 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m) where
909− liftParseJSON2 pN pO = withArray "(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)" $ \t ->
909+ liftParseJSON2 pN _ pO _ = withArray "(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)" $ \t ->
910910 let n = V.length t
911911 in if n == 15
912912 then (,,,,,,,,,,,,,,)
@@ -929,9 +929,11 @@ instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f
929929 {-# INLINE liftParseJSON2 #-}
930930
931931instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m, FromJSON n) => FromJSON1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) where
932− liftParseJSON = liftParseJSON2 parseJSON
932+ liftParseJSON = liftParseJSON2 parseJSON parseJSONList
933933 {-# INLINE liftParseJSON #-}
934934
935935instance (FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m, FromJSON n, FromJSON o) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) where
936936 parseJSON = parseJSON2
937937 {-# INLINE parseJSON #-}
938+
939+
tuple-instances.hs+6−6
@@ -30,7 +30,7 @@ tuple :: Int -> String
3030tuple n = fold $ flip execState DList.empty $ do
3131 -- ToJSON2
3232 t ["instance ", toJsonContext2, "ToJSON2 (", tupleConstr, " ", vs2, ") where" ]
33− t [" liftToJSON2 ", toPrev, " ", toLast, " ", vs', " = Array $ V.create $ do" ]
33+ t [" liftToJSON2 ", toPrev, " _ ", toLast, " _ ", vs', " = Array $ V.create $ do" ]
3434 t [" mv <- VM.unsafeNew ", show n ]
3535 forM_ (zip [0..] vs) $ \(i, v) ->
3636 let to = case i of
@@ -42,7 +42,7 @@ tuple n = fold $ flip execState DList.empty $ do
4242 t [" {-# INLINE liftToJSON2 #-}" ]
4343 t []
4444
45− t [" liftToEncoding2 ", toPrev, " ", toLast, " ", vs', " = tuple $" ]
45+ t [" liftToEncoding2 ", toPrev, " _ ", toLast, " _ ", vs', " = tuple $" ]
4646 forM_ (zip [0..] vs) $ \(i, v) -> t . (" " :) $ case i of
4747
4848 _ | i == n - 1 -> [ "fromEncoding (", toLast, " ", v, ")" ]
@@ -53,9 +53,9 @@ tuple n = fold $ flip execState DList.empty $ do
5353
5454 -- ToJSON1
5555 t ["instance ", toJsonContext1, "ToJSON1 (", tupleConstr, " ", vs1, ") where" ]
56− t [" liftToJSON = liftToJSON2 toJSON" ]
56+ t [" liftToJSON = liftToJSON2 toJSON toJSONList" ]
5757 t [" {-# INLINE liftToJSON #-}" ]
58− t [" liftToEncoding = liftToEncoding2 toEncoding" ]
58+ t [" liftToEncoding = liftToEncoding2 toEncoding toEncodingList" ]
5959 t [" {-# INLINE liftToEncoding #-}" ]
6060 t []
6161
@@ -69,7 +69,7 @@ tuple n = fold $ flip execState DList.empty $ do
6969
7070 -- FromJSON2
7171 t ["instance ", fromJsonContext2, "FromJSON2 (", tupleConstr, " ", vs2, ") where" ]
72− t [" liftParseJSON2 ", pPrev, " ", pLast, " = withArray \"", vs', "\" $ \\t -> " ]
72+ t [" liftParseJSON2 ", pPrev, " _ ", pLast, " _ = withArray \"", vs', "\" $ \\t -> " ]
7373 t [" let n = V.length t" ]
7474 t [" in if n == ", show n ]
7575 t [" then ", tupleConstr ]
@@ -86,7 +86,7 @@ tuple n = fold $ flip execState DList.empty $ do
8686
8787 -- FromJSON1
8888 t ["instance ", fromJsonContext1, "FromJSON1 (", tupleConstr, " ", vs1, ") where" ]
89− t [" liftParseJSON = liftParseJSON2 parseJSON" ]
89+ t [" liftParseJSON = liftParseJSON2 parseJSON parseJSONList" ]
9090 t [" {-# INLINE liftParseJSON #-}" ]
9191 t []
9292