@@ -349,7 +349,7 @@ instance (SListI tys, IsProductType x xs, AllZip ToNullityParam xs tys)
349349-- a PostgreSQL `PGType` into a Haskell `Type`.
350350class FromValue (pg :: PGType) (y :: Type) where
351351 -- | >>> newtype Id = Id { getId :: Int16 } deriving Show
352− -- >>> instance FromValue 'PGint2 Id where fromValue = fmap Id . fromValue
352+ -- >>> instance FromValue 'PGint2 Id where fromValue = Id <$> fromValue @'PGint2
353353 fromValue :: Decoding.Value y
354354instance FromValue 'PGbool Bool where fromValue = Decoding.bool
355355instance FromValue 'PGint2 Int16 where fromValue = Decoding.int
@@ -484,7 +484,7 @@ class SListI result => FromRow (result :: RelationType) y where
484484 -- | >>> :set -XOverloadedStrings
485485 -- >>> import Data.Text
486486 -- >>> newtype UserId = UserId { getUserId :: Int16 } deriving Show
487− -- >>> instance FromValue 'PGint2 UserId where fromValue = fmap UserId . fromValue
487+ -- >>> instance FromValue 'PGint2 UserId where fromValue = UserId <$> fromValue @'PGint2
488488 -- >>> data UserRow = UserRow { userId :: UserId, userName :: Maybe Text } deriving (Show, GHC.Generic)
489489 -- >>> instance Generic UserRow
490490 -- >>> instance HasDatatypeInfo UserRow