@@ -621,43 +621,44 @@ instance (FromJSON a) => FromJSON [a] where
621621-- Functions
622622-------------------------------------------------------------------------------
623623
624−-- | @withObject expected f value@ applies @f@ to the 'Object' when @value@ is an @Object@
625−-- and fails using @'typeMismatch' expected@ otherwise.
624+-- | @'withObject' expected f value@ applies @f@ to the 'Object' when @value@
625+-- is an 'Object' and fails using @'typeMismatch' expected@ otherwise.
626626withObject :: String -> (Object -> Parser a) -> Value -> Parser a
627627withObject _ f (Object obj) = f obj
628628withObject expected _ v = typeMismatch expected v
629629{-# INLINE withObject #-}
630630
631−-- | @withText expected f value@ applies @f@ to the 'Text' when @value@ is a @String@
632−-- and fails using @'typeMismatch' expected@ otherwise.
631+-- | @'withText' expected f value@ applies @f@ to the 'Text' when @value@ is a
632+-- 'String' and fails using @'typeMismatch' expected@ otherwise.
633633withText :: String -> (Text -> Parser a) -> Value -> Parser a
634634withText _ f (String txt) = f txt
635635withText expected _ v = typeMismatch expected v
636636{-# INLINE withText #-}
637637
638−-- | @withArray expected f value@ applies @f@ to the 'Array' when @value@ is an @Array@
639−-- and fails using @'typeMismatch' expected@ otherwise.
638+-- | @'withArray' expected f value@ applies @f@ to the 'Array' when @value@ is
639+-- an 'Array' and fails using @'typeMismatch' expected@ otherwise.
640640withArray :: String -> (Array -> Parser a) -> Value -> Parser a
641641withArray _ f (Array arr) = f arr
642642withArray expected _ v = typeMismatch expected v
643643{-# INLINE withArray #-}
644644
645−-- | @withNumber expected f value@ applies @f@ to the 'Number' when @value@ is a 'Number'.
646−-- and fails using @'typeMismatch' expected@ otherwise.
645+-- | @'withNumber' expected f value@ applies @f@ to the 'Number' when @value@
646+-- is a 'Number' and fails using @'typeMismatch' expected@ otherwise.
647647withNumber :: String -> (Number -> Parser a) -> Value -> Parser a
648648withNumber expected f = withScientific expected (f . scientificToNumber)
649649{-# INLINE withNumber #-}
650650{-# DEPRECATED withNumber "Use withScientific instead" #-}
651651
652−-- | @withScientific expected f value@ applies @f@ to the 'Scientific' number when @value@ is a 'Number'.
653−-- and fails using @'typeMismatch' expected@ otherwise.
652+-- | @'withScientific' expected f value@ applies @f@ to the 'Scientific' number
653+-- when @value@ is a 'Number' and fails using @'typeMismatch' expected@
654+-- otherwise.
654655withScientific :: String -> (Scientific -> Parser a) -> Value -> Parser a
655656withScientific _ f (Number scientific) = f scientific
656657withScientific expected _ v = typeMismatch expected v
657658{-# INLINE withScientific #-}
658659
659−-- | @withBool expected f value@ applies @f@ to the 'Bool' when @value@ is a @Bool@
660−-- and fails using @'typeMismatch' expected@ otherwise.
660+-- | @'withBool' expected f value@ applies @f@ to the 'Bool' when @value@ is a
661+-- 'Bool' and fails using @'typeMismatch' expected@ otherwise.
661662withBool :: String -> (Bool -> Parser a) -> Value -> Parser a
662663withBool _ f (Bool arr) = f arr
663664withBool expected _ v = typeMismatch expected v