on master help sign in
Do some selective hlinting.
commit569c1d9b8b1f1b0e6c8a11e54184703f650f3215 authorAdam Bergmark <adam@bergmark.nl> dateThu 16 Jun 2016, 17:02 (10 years ago) parent8060f93
8 files changed+64−69
Data/Aeson/Encoding/Builder.hs+6−6 Data/Aeson/Parser.hs+1−1 Data/Aeson/Parser/Internal.hs+1−2 Data/Aeson/TH.hs+31−31 Data/Aeson/Types/Class.hs−3 Data/Aeson/Types/FromJSON.hs+15−16 Data/Aeson/Types/Internal.hs+1−1 Data/Aeson/Types/ToJSON.hs+9−9
Data/Aeson/Encoding/Builder.hs+6−6
@@ -120,7 +120,7 @@ escapeAscii =
120120 BP.condB (== c2w '\n' ) (ascii2 ('\\','n' )) $
121121 BP.condB (== c2w '\r' ) (ascii2 ('\\','r' )) $
122122 BP.condB (== c2w '\t' ) (ascii2 ('\\','t' )) $
123− (BP.liftFixedToBounded hexEscape) -- fallback for chars < 0x20
123+ BP.liftFixedToBounded hexEscape -- fallback for chars < 0x20
124124 where
125125 hexEscape :: BP.FixedPrim Word8
126126 hexEscape = (\c -> ('\\', ('u', fromIntegral c))) BP.>$<
@@ -145,27 +145,27 @@ emptyObject_ :: Builder
145145emptyObject_ = BP.primBounded (ascii2 ('{','}')) ()
146146
147147ascii2 :: (Char, Char) -> BP.BoundedPrim a
148−ascii2 cs = BP.liftFixedToBounded $ (const cs) BP.>$< BP.char7 >*< BP.char7
148+ascii2 cs = BP.liftFixedToBounded $ const cs BP.>$< BP.char7 >*< BP.char7
149149{-# INLINE ascii2 #-}
150150
151151ascii4 :: (Char, (Char, (Char, Char))) -> BP.BoundedPrim a
152−ascii4 cs = BP.liftFixedToBounded $ (const cs) >$<
152+ascii4 cs = BP.liftFixedToBounded $ const cs >$<
153153 BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7
154154{-# INLINE ascii4 #-}
155155
156156ascii5 :: (Char, (Char, (Char, (Char, Char)))) -> BP.BoundedPrim a
157−ascii5 cs = BP.liftFixedToBounded $ (const cs) >$<
157+ascii5 cs = BP.liftFixedToBounded $ const cs >$<
158158 BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7
159159{-# INLINE ascii5 #-}
160160
161161ascii6 :: (Char, (Char, (Char, (Char, (Char, Char))))) -> BP.BoundedPrim a
162−ascii6 cs = BP.liftFixedToBounded $ (const cs) >$<
162+ascii6 cs = BP.liftFixedToBounded $ const cs >$<
163163 BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7
164164{-# INLINE ascii6 #-}
165165
166166ascii8 :: (Char, (Char, (Char, (Char, (Char, (Char, (Char, Char)))))))
167167 -> BP.BoundedPrim a
168−ascii8 cs = BP.liftFixedToBounded $ (const cs) >$<
168+ascii8 cs = BP.liftFixedToBounded $ const cs >$<
169169 BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7 >*<
170170 BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7
171171{-# INLINE ascii8 #-}
Data/Aeson/Parser.hs+1−1
@@ -1,4 +1,4 @@
1−{-# LANGUAGE BangPatterns, OverloadedStrings #-}
1+{-# LANGUAGE OverloadedStrings #-}
22
33-- |
44-- Module: Data.Aeson.Parser
Data/Aeson/Parser/Internal.hs+1−2
@@ -48,8 +48,7 @@ import Data.Text.Internal.Unsafe.Char (ord)
4848import Data.Vector as Vector (Vector, empty, fromList, reverse)
4949import Data.Word (Word8)
5050import Foreign.ForeignPtr (withForeignPtr)
51−import Foreign.Ptr (Ptr, plusPtr)
52−import Foreign.Ptr (minusPtr)
51+import Foreign.Ptr (Ptr, minusPtr, plusPtr)
5352import Foreign.Storable (poke)
5453import System.IO.Unsafe (unsafePerformIO)
5554import qualified Data.Attoparsec.ByteString as A
Data/Aeson/TH.hs+31−31
@@ -479,7 +479,7 @@ argsToValue jc tjs opts multiCons (NormalC conName ts) = do
479479 litE (integerL $ fromIntegral len))
480480 stmts = [ noBindS $
481481 [|VM.unsafeWrite|] `appE`
482− (varE mv) `appE`
482+ varE mv `appE`
483483 litE (integerL ix) `appE`
484484 e
485485 | (ix, e) <- zip [(0::Integer)..] es
@@ -618,7 +618,7 @@ nullarySumToEncoding opts multiCons conName =
618618 case sumEncoding opts of
619619 TaggedObject{tagFieldName} ->
620620 object $
621− ([|E.text (T.pack tagFieldName)|] <:> encStr opts conName)
621+ [|E.text (T.pack tagFieldName)|] <:> encStr opts conName
622622 _ -> sumToEncoding opts multiCons conName [e|toEncoding ([] :: [()])|]
623623
624624-- | Generates code to generate the JSON encoding of a single constructor.
@@ -859,7 +859,7 @@ consFromJSON jc tName opts cons = do
859859 [ liftM2 (,)
860860 (normalG [|otherwise|])
861861 ( [|noMatchFail|]
862− `appE` (litE $ stringL $ show tName)
862+ `appE` litE (stringL $ show tName)
863863 `appE` ([|T.unpack|] `appE` varE txt)
864864 )
865865 ]
@@ -868,7 +868,7 @@ consFromJSON jc tName opts cons = do
868868 , do other <- newName "other"
869869 match (varP other)
870870 (normalB $ [|noStringFail|]
871− `appE` (litE $ stringL $ show tName)
871+ `appE` litE (stringL $ show tName)
872872 `appE` ([|valueConName|] `appE` varE other)
873873 )
874874 []
@@ -883,15 +883,15 @@ consFromJSON jc tName opts cons = do
883883 TwoElemArray ->
884884 [ do arr <- newName "array"
885885 match (conP 'Array [varP arr])
886− (guardedB $
886+ (guardedB
887887 [ liftM2 (,) (normalG $ infixApp ([|V.length|] `appE` varE arr)
888888 [|(==)|]
889889 (litE $ integerL 2))
890890 (parse2ElemArray pjs arr)
891891 , liftM2 (,) (normalG [|otherwise|])
892− (([|not2ElemArray|]
893− `appE` (litE $ stringL $ show tName)
894− `appE` ([|V.length|] `appE` varE arr)))
892+ ([|not2ElemArray|]
893+ `appE` litE (stringL $ show tName)
894+ `appE` ([|V.length|] `appE` varE arr))
895895 ]
896896 )
897897 []
@@ -899,7 +899,7 @@ consFromJSON jc tName opts cons = do
899899 match (varP other)
900900 ( normalB
901901 $ [|noArrayFail|]
902− `appE` (litE $ stringL $ show tName)
902+ `appE` litE (stringL $ show tName)
903903 `appE` ([|valueConName|] `appE` varE other)
904904 )
905905 []
@@ -912,7 +912,7 @@ consFromJSON jc tName opts cons = do
912912 match (varP other)
913913 ( normalB
914914 $ [|noObjectFail|]
915− `appE` (litE $ stringL $ show tName)
915+ `appE` litE (stringL $ show tName)
916916 `appE` ([|valueConName|] `appE` varE other)
917917 )
918918 []
@@ -952,7 +952,7 @@ consFromJSON jc tName opts cons = do
952952 match (varP other)
953953 ( normalB
954954 $ [|firstElemNoStringFail|]
955− `appE` (litE $ stringL $ show tName)
955+ `appE` litE (stringL $ show tName)
956956 `appE` ([|valueConName|] `appE` varE other)
957957 )
958958 []
@@ -969,7 +969,7 @@ consFromJSON jc tName opts cons = do
969969 , do other <- newName "other"
970970 match (varP other)
971971 (normalB $ [|wrongPairCountFail|]
972− `appE` (litE $ stringL $ show tName)
972+ `appE` litE (stringL $ show tName)
973973 `appE` ([|show . length|] `appE` varE other)
974974 )
975975 []
@@ -991,7 +991,7 @@ consFromJSON jc tName opts cons = do
991991 [ liftM2 (,)
992992 (normalG [e|otherwise|])
993993 ( varE errorFun
994− `appE` (litE $ stringL $ show tName)
994+ `appE` litE (stringL $ show tName)
995995 `appE` listE (map ( litE
996996 . stringL
997997 . constructorTagModifier opts
@@ -1010,13 +1010,13 @@ parseNullaryMatches :: Name -> Name -> [Q Match]
10101010parseNullaryMatches tName conName =
10111011 [ do arr <- newName "arr"
10121012 match (conP 'Array [varP arr])
1013− (guardedB $
1013+ (guardedB
10141014 [ liftM2 (,) (normalG $ [|V.null|] `appE` varE arr)
10151015 ([|pure|] `appE` conE conName)
10161016 , liftM2 (,) (normalG [|otherwise|])
10171017 (parseTypeMismatch tName conName
10181018 (litE $ stringL "an empty Array")
1019− (infixApp (litE $ stringL $ "Array of length ")
1019+ (infixApp (litE $ stringL "Array of length ")
10201020 [|(++)|]
10211021 ([|show . V.length|] `appE` varE arr)
10221022 )
@@ -1055,9 +1055,9 @@ parseRecord jc tvMap argTys opts tName conName ts obj =
10551055 where
10561056 x:xs = [ [|lookupField|]
10571057 `appE` dispatchParseJSON jc conName tvMap argTy
1058− `appE` (litE $ stringL $ show tName)
1059− `appE` (litE $ stringL $ constructorTagModifier opts $ nameBase conName)
1060− `appE` (varE obj)
1058+ `appE` litE (stringL $ show tName)
1059+ `appE` litE (stringL $ constructorTagModifier opts $ nameBase conName)
1060+ `appE` varE obj
10611061 `appE` ( [|T.pack|] `appE` fieldLabelExp opts field
10621062 )
10631063 | ((field, _, _), argTy) <- zip ts argTys
@@ -1069,7 +1069,7 @@ getValField obj valFieldName matches = do
10691069 doE [ bindS (varP val) $ infixApp (varE obj)
10701070 [|(.:)|]
10711071 ([|T.pack|] `appE`
1072− (litE $ stringL valFieldName))
1072+ litE (stringL valFieldName))
10731073 , noBindS $ caseE (varE val) matches
10741074 ]
10751075
@@ -1172,7 +1172,7 @@ parseProduct jc tvMap argTys tName conName numArgs =
11721172 )
11731173 ( parseTypeMismatch tName conName
11741174 (litE $ stringL $ "Array of length " ++ show numArgs)
1175− ( infixApp (litE $ stringL $ "Array of length ")
1175+ ( infixApp (litE $ stringL "Array of length ")
11761176 [|(++)|]
11771177 ([|show . V.length|] `appE` varE arr)
11781178 )
@@ -1306,7 +1306,7 @@ deriveJSONClass :: [(JSONFun, JSONClass -> Name -> Options -> [Con] -> Q Exp)]
13061306 -> Q [Dec]
13071307deriveJSONClass consFuns jc opts name =
13081308 withType name $ \name' ctxt tvbs cons mbTys ->
1309− fmap (:[]) $ fromCons name' ctxt tvbs cons mbTys
1309+ (:[]) <$> fromCons name' ctxt tvbs cons mbTys
13101310 where
13111311 fromCons :: Name -> Cxt -> [TyVarBndr] -> [Con] -> Maybe [Type] -> Q Dec
13121312 fromCons name' ctxt tvbs cons mbTys = do
@@ -1379,8 +1379,8 @@ dispatchFunByType jc jf conName tvMap list ty = do
13791379 if any (`mentionsName` tyVarNames) lhsArgs
13801380 || itf && any (`mentionsName` tyVarNames) tyArgs
13811381 then outOfPlaceTyVarError jc conName
1382− else appsE $ [ varE . jsonFunValOrListName list jf $ toEnum numLastArgs]
1383− ++ zipWith (dispatchFunByType jc jf conName tvMap)
1382+ else appsE $ varE (jsonFunValOrListName list jf $ toEnum numLastArgs)
1383+ : zipWith (dispatchFunByType jc jf conName tvMap)
13841384 (cycle [False,True])
13851385 (interleave rhsArgs rhsArgs)
13861386
@@ -1590,7 +1590,7 @@ buildTypeInstanceFromTys tyConName jc dataCxt varTysOrig isDataFamily = do
15901590
15911591 -- Check there are enough types to drop and that all of them are either of
15921592 -- kind * or kind k (for some kind variable k). If not, throw an error.
1593− when (remainingLength < 0 || any (== NotKindStar) droppedStarKindStati) $
1593+ when (remainingLength < 0 || elem NotKindStar droppedStarKindStati) $
15941594 derivingKindError jc tyConName
15951595
15961596 let droppedKindVarNames :: [Name]
@@ -1854,7 +1854,7 @@ reifyConTys jc tpjs conName = do
18541854 -- arguments of a type that it (1) one of the last type variables,
18551855 -- and (2) of a truly polymorphic type.
18561856 jArity = arityInt jc
1857− mbTvNames = map varTToName_maybe $
1857+ mbTvNames = map varTToNameMaybe $
18581858 NE.drop (NE.length unapResTy - jArity) unapResTy
18591859 -- We use M.fromList to ensure that if there are any duplicate type
18601860 -- variables (as can happen in a GADT), the rightmost type variable gets
@@ -1990,15 +1990,15 @@ tyKind _ = starK
19901990
19911991-- | Extract Just the Name from a type variable. If the argument Type is not a
19921992-- type variable, return Nothing.
1993−varTToName_maybe :: Type -> Maybe Name
1994−varTToName_maybe (VarT n) = Just n
1995−varTToName_maybe (SigT t _) = varTToName_maybe t
1996−varTToName_maybe _ = Nothing
1993+varTToNameMaybe :: Type -> Maybe Name
1994+varTToNameMaybe (VarT n) = Just n
1995+varTToNameMaybe (SigT t _) = varTToNameMaybe t
1996+varTToNameMaybe _ = Nothing
19971997
19981998-- | Extract the Name from a type variable. If the argument Type is not a
19991999-- type variable, throw an error.
20002000varTToName :: Type -> Name
2001−varTToName = fromMaybe (error "Not a type variable!") . varTToName_maybe
2001+varTToName = fromMaybe (error "Not a type variable!") . varTToNameMaybe
20022002
20032003-- | Extracts the name from a constructor.
20042004getConName :: Con -> Name
@@ -2195,7 +2195,7 @@ canEtaReduce remaining dropped =
21952195-- | Expands all type synonyms in a type. Written by Dan Rosén in the
21962196-- @genifunctors@ package (licensed under BSD3).
21972197expandSyn :: Type -> Q Type
2198−expandSyn (ForallT tvs ctx t) = fmap (ForallT tvs ctx) $ expandSyn t
2198+expandSyn (ForallT tvs ctx t) = ForallT tvs ctx <$> expandSyn t
21992199expandSyn t@AppT{} = expandSynApp t []
22002200expandSyn t@ConT{} = expandSynApp t []
22012201expandSyn (SigT t k) = do t' <- expandSyn t
Data/Aeson/Types/Class.hs−3
@@ -1,7 +1,4 @@
11{-# LANGUAGE CPP #-}
2−{-# LANGUAGE DefaultSignatures #-}
3−{-# LANGUAGE DeriveFunctor #-}
4−{-# LANGUAGE EmptyDataDecls #-}
52{-# LANGUAGE FlexibleContexts #-}
63{-# LANGUAGE FlexibleInstances #-}
74{-# LANGUAGE GADTs #-}
Data/Aeson/Types/FromJSON.hs+15−16
@@ -78,7 +78,7 @@ import qualified Data.Attoparsec.ByteString.Char8 as A (endOfInput, parseOnly,
7878 scientific)
7979
8080import Control.Applicative (Const (..), (<|>))
81−import Control.Monad ((<=<))
81+import Control.Monad ((<=<), zipWithM)
8282import Data.Attoparsec.Number (Number (..))
8383import Data.Bits (unsafeShiftR)
8484import Data.Fixed (Fixed, HasResolution)
@@ -312,8 +312,7 @@ class FromJSON a where
312312
313313 parseJSONList :: Value -> Parser [a]
314314 parseJSONList (Array a)
315− = sequence
316− . zipWith (parseIndexedJSON parseJSON) [0..]
315+ = zipWithM (parseIndexedJSON parseJSON) [0..]
317316 . V.toList
318317 $ a
319318
@@ -323,7 +322,7 @@ class FromJSON a where
323322-- Classes and types for map keys
324323-------------------------------------------------------------------------------
325324
326−-- | Read the docs for 'ToJSONKey' first. This class is a conversion
325+-- | Read the docs for 'ToJSONKey' first. This class is a conversion
327326-- in the opposite direction. If you have a newtype wrapper around 'Text',
328327-- the recommended way to define instances is with generalized newtype deriving:
329328--
@@ -346,10 +345,10 @@ class FromJSONKey a where
346345
347346-- | With GHC 7.8+ we carry around @'Coercible' 'Text' a@ dictionary,
348347-- to give us an assurance that the program will not segfault.
349−-- Unfortunately we cannot enforce that the 'Eq' instances or the
348+-- Unfortunately we cannot enforce that the 'Eq' instances or the
350349-- 'Hashable' instances for 'Text' and @a@ agree.
351350--
352−-- At the moment this type is intentionally not exported. 'FromJSONKeyFunction'
351+-- At the moment this type is intentionally not exported. 'FromJSONKeyFunction'
353352-- can be inspected, but cannot be constructed.
354353data CoerceText a where
355354#if HAS_COERCIBLE
@@ -725,7 +724,7 @@ instance ( AllNullary (a :+: b) allNullary
725724 -- encoded as strings. This distinction is made by 'parseSum':
726725 gParseJSON opts pa pj pjl =
727726 (unTagged :: Tagged allNullary (Parser ((a :+: b) d)) ->
728− (Parser ((a :+: b) d)))
727+ Parser ((a :+: b) d))
729728 . parseSum opts pa pj pjl
730729
731730instance (FromJSON1 f, GFromJSON One g) => GFromJSON One (f :.: g) where
@@ -872,8 +871,8 @@ class ConsFromJSON arity f where
872871
873872class ConsFromJSON' arity f isRecord where
874873 consParseJSON' :: Options -> Proxy arity
875− -> (Maybe Text) -- ^ A dummy label
876− -- (Nothing to use proper label)
874+ -> Maybe Text -- ^ A dummy label
875+ -- (Nothing to use proper label)
877876 -> (Value -> Parser a) -> (Value -> Parser [a])
878877 -> Value -> Tagged isRecord (Parser (f a))
879878
@@ -883,15 +882,15 @@ instance ( IsRecord f isRecord
883882 consParseJSON opts pa pj pjl v = let
884883 (v2,lab) = case (unwrapUnaryRecords opts,isUnary (undefined :: f a)) of
885884 -- use a dummy object with a dummy label
886− (True,True) -> ((object [(pack "dummy",v)]),Just $ pack "dummy")
885+ (True,True) -> (object [(pack "dummy",v)], Just $ pack "dummy")
887886 _ ->(v,Nothing)
888887 in (unTagged :: Tagged isRecord (Parser (f a)) -> Parser (f a))
889888 $ consParseJSON' opts pa lab pj pjl v2
890889
891890
892891instance (FromRecord arity f) => ConsFromJSON' arity f True where
893− consParseJSON' opts pa mlab pj pjl = Tagged . (withObject "record (:*:)"
894− $ parseRecord opts pa mlab pj pjl)
892+ consParseJSON' opts pa mlab pj pjl = Tagged . withObject "record (:*:)"
893+ (parseRecord opts pa mlab pj pjl)
895894
896895instance (GFromJSON arity f) => ConsFromJSON' arity f False where
897896 consParseJSON' opts pa _ pj pjl = Tagged . gParseJSON opts pa pj pjl
@@ -900,8 +899,8 @@ instance (GFromJSON arity f) => ConsFromJSON' arity f False where
900899
901900class FromRecord arity f where
902901 parseRecord :: Options -> Proxy arity
903− -> (Maybe Text) -- ^ A dummy label
904− -- (Nothing to use proper label)
902+ -> Maybe Text -- ^ A dummy label
903+ -- (Nothing to use proper label)
905904 -> (Value -> Parser a) -> (Value -> Parser [a])
906905 -> Object -> Parser (f a)
907906
@@ -1240,7 +1239,7 @@ parseVersionText = go . readP_to_S parseVersion . unpack
12401239 where
12411240 go [(v,[])] = return v
12421241 go (_ : xs) = go xs
1243− go _ = fail $ "could not parse Version"
1242+ go _ = fail "could not parse Version"
12441243
12451244-------------------------------------------------------------------------------
12461245-- semigroups NonEmpty
@@ -1619,7 +1618,7 @@ instance (FromJSONKey a, FromJSON a) => FromJSONKey [a] where
16191618-- Tuple instances, see tuple-instances-from.hs
16201619-------------------------------------------------------------------------------
16211620
1622−instance FromJSON2 ((,) ) where
1621+instance FromJSON2 (,) where
16231622 liftParseJSON2 pA _ pB _ = withArray "(a, b)" $ \t ->
16241623 let n = V.length t
16251624 in if n == 2
Data/Aeson/Types/Internal.hs+1−1
@@ -430,7 +430,7 @@ parseEither m v = runParser (m v) [] onError Right
430430-- | Annotate an error message with a
431431-- <http://goessner.net/articles/JsonPath/ JSONPath> error location.
432432formatError :: JSONPath -> String -> String
433−formatError path msg = "Error in " ++ (format "$" path) ++ ": " ++ msg
433+formatError path msg = "Error in " ++ format "$" path ++ ": " ++ msg
434434 where
435435 format :: String -> JSONPath -> String
436436 format pfx [] = pfx
Data/Aeson/Types/ToJSON.hs+9−9
@@ -697,7 +697,7 @@ instance ( AllNullary (a :+: b) allNullary
697697 -- 'allNullaryToStringTag' option is set they are encoded to
698698 -- strings. This distinction is made by 'sumToEncoding':
699699 gToEncoding opts pa te tel
700− = (unTagged :: Tagged allNullary (Encoding) -> Encoding)
700+ = (unTagged :: Tagged allNullary Encoding -> Encoding)
701701 . sumToEncoding opts pa te tel
702702
703703instance (ToJSON1 f, GToEncoding One g) => GToEncoding One (f :.: g) where
@@ -749,7 +749,7 @@ nonAllNullarySumToJSON opts pa tj tjl =
749749class SumToEncoding arity f allNullary where
750750 sumToEncoding :: Options -> Proxy arity
751751 -> (a -> Encoding) -> ([a] -> Encoding)
752− -> f a -> Tagged allNullary (Encoding)
752+ -> f a -> Tagged allNullary Encoding
753753
754754instance ( GetConName f
755755 , TaggedObjectEnc arity f
@@ -847,13 +847,13 @@ instance ( IsRecord a isRecord
847847 (E.string tagFieldName ><
848848 E.colon ><
849849 toEncoding (constructorTagModifier opts (conName (undefined :: t c a p)))) ><
850− ((unTagged :: Tagged isRecord (Encoding) -> Encoding) .
850+ ((unTagged :: Tagged isRecord Encoding -> Encoding) .
851851 taggedObjectEnc' opts pa contentsFieldName te tel . unM1 $ v)
852852
853853class TaggedObjectEnc' arity f isRecord where
854854 taggedObjectEnc' :: Options -> Proxy arity
855855 -> String -> (a -> Encoding) -> ([a] -> Encoding)
856− -> f a -> Tagged isRecord (Encoding)
856+ -> f a -> Tagged isRecord Encoding
857857
858858instance OVERLAPPING_ TaggedObjectEnc' arity U1 False where
859859 taggedObjectEnc' _ _ _ _ _ _ = Tagged E.empty
@@ -966,13 +966,13 @@ class ConsToEncoding' arity f isRecord where
966966 consToEncoding' :: Options -> Proxy arity
967967 -> Bool -- ^ Are we a record with one field?
968968 -> (a -> Encoding) -> ([a] -> Encoding)
969− -> f a -> Tagged isRecord (Encoding)
969+ -> f a -> Tagged isRecord Encoding
970970
971971instance ( IsRecord f isRecord
972972 , ConsToEncoding' arity f isRecord
973973 ) => ConsToEncoding arity f where
974974 consToEncoding opts pa te tel =
975− (unTagged :: Tagged isRecord (Encoding) -> (Encoding))
975+ (unTagged :: Tagged isRecord Encoding -> Encoding)
976976 . consToEncoding' opts pa (isUnary (undefined :: f a)) te tel
977977
978978instance (RecordToEncoding arity f) => ConsToEncoding' arity f True where
@@ -1023,7 +1023,7 @@ class RecordToEncoding arity f where
10231023 -- of the field (without the key); 'Nothing' otherwise
10241024 recordToEncoding :: Options -> Proxy arity
10251025 -> (a -> Encoding) -> ([a] -> Encoding)
1026− -> f a -> (Encoding, Maybe (Encoding))
1026+ -> f a -> (Encoding, Maybe Encoding)
10271027
10281028instance ( RecordToEncoding arity a
10291029 , RecordToEncoding arity b
@@ -1052,7 +1052,7 @@ instance OVERLAPPING_ (Selector s, ToJSON a) =>
10521052fieldToEncoding :: (Selector s, GToEncoding arity a)
10531053 => Options -> Proxy arity
10541054 -> (p -> Encoding) -> ([p] -> Encoding)
1055− -> S1 s a p -> (Encoding, Maybe (Encoding))
1055+ -> S1 s a p -> (Encoding, Maybe Encoding)
10561056fieldToEncoding opts pa te tel m1 =
10571057 let keyBuilder = toEncoding (fieldLabelModifier opts $ selName m1)
10581058 valueBuilder = gToEncoding opts pa te tel (unM1 m1)
@@ -2052,7 +2052,7 @@ instance (ToJSONKey a, ToJSON a) => ToJSONKey [a] where
20522052-- Tuple instances, see tuple-instances-to.hs
20532053-------------------------------------------------------------------------------
20542054
2055−instance ToJSON2 ((,) ) where
2055+instance ToJSON2 (,) where
20562056 liftToJSON2 toA _ toB _ (a, b) = Array $ V.create $ do
20572057 mv <- VM.unsafeNew 2
20582058 VM.unsafeWrite mv 0 (toA a)