@@ -350,61 +350,61 @@ instance (SListI tys, IsProductType x xs, AllZip ToNullityParam xs tys)
350350class FromValue (pg :: PGType) (y :: Type) where
351351 -- | >>> newtype Id = Id { getId :: Int16 } deriving Show
352352 -- >>> instance FromValue 'PGint2 Id where fromValue = fmap Id . fromValue
353− fromValue :: proxy pg -> Decoding.Value y
354−instance FromValue 'PGbool Bool where fromValue _ = Decoding.bool
355−instance FromValue 'PGint2 Int16 where fromValue _ = Decoding.int
356−instance FromValue 'PGint4 Int32 where fromValue _ = Decoding.int
357−instance FromValue 'PGint8 Int64 where fromValue _ = Decoding.int
358−instance FromValue 'PGfloat4 Float where fromValue _ = Decoding.float4
359−instance FromValue 'PGfloat8 Double where fromValue _ = Decoding.float8
360−instance FromValue 'PGnumeric Scientific where fromValue _ = Decoding.numeric
361−instance FromValue 'PGuuid UUID where fromValue _ = Decoding.uuid
362−instance FromValue 'PGinet (NetAddr IP) where fromValue _ = Decoding.inet
363−instance FromValue ('PGchar 1) Char where fromValue _ = Decoding.char
364−instance FromValue 'PGtext Strict.Text where fromValue _ = Decoding.text_strict
365−instance FromValue 'PGtext Lazy.Text where fromValue _ = Decoding.text_lazy
353+ fromValue :: Decoding.Value y
354+instance FromValue 'PGbool Bool where fromValue = Decoding.bool
355+instance FromValue 'PGint2 Int16 where fromValue = Decoding.int
356+instance FromValue 'PGint4 Int32 where fromValue = Decoding.int
357+instance FromValue 'PGint8 Int64 where fromValue = Decoding.int
358+instance FromValue 'PGfloat4 Float where fromValue = Decoding.float4
359+instance FromValue 'PGfloat8 Double where fromValue = Decoding.float8
360+instance FromValue 'PGnumeric Scientific where fromValue = Decoding.numeric
361+instance FromValue 'PGuuid UUID where fromValue = Decoding.uuid
362+instance FromValue 'PGinet (NetAddr IP) where fromValue = Decoding.inet
363+instance FromValue ('PGchar 1) Char where fromValue = Decoding.char
364+instance FromValue 'PGtext Strict.Text where fromValue = Decoding.text_strict
365+instance FromValue 'PGtext Lazy.Text where fromValue = Decoding.text_lazy
366366instance FromValue 'PGbytea Strict.ByteString where
367− fromValue _ = Decoding.bytea_strict
367+ fromValue = Decoding.bytea_strict
368368instance FromValue 'PGbytea Lazy.ByteString where
369− fromValue _ = Decoding.bytea_lazy
370−instance FromValue 'PGdate Day where fromValue _ = Decoding.date
371−instance FromValue 'PGtime TimeOfDay where fromValue _ = Decoding.time_int
369+ fromValue = Decoding.bytea_lazy
370+instance FromValue 'PGdate Day where fromValue = Decoding.date
371+instance FromValue 'PGtime TimeOfDay where fromValue = Decoding.time_int
372372instance FromValue 'PGtimetz (TimeOfDay, TimeZone) where
373− fromValue _ = Decoding.timetz_int
373+ fromValue = Decoding.timetz_int
374374instance FromValue 'PGtimestamp LocalTime where
375− fromValue _ = Decoding.timestamp_int
375+ fromValue = Decoding.timestamp_int
376376instance FromValue 'PGtimestamptz UTCTime where
377− fromValue _ = Decoding.timestamptz_int
377+ fromValue = Decoding.timestamptz_int
378378instance FromValue 'PGinterval DiffTime where
379− fromValue _ = Decoding.interval_int
380−instance FromValue 'PGjson Value where fromValue _ = Decoding.json_ast
381−instance FromValue 'PGjsonb Value where fromValue _ = Decoding.jsonb_ast
379+ fromValue = Decoding.interval_int
380+instance FromValue 'PGjson Value where fromValue = Decoding.json_ast
381+instance FromValue 'PGjsonb Value where fromValue = Decoding.jsonb_ast
382382instance FromValue pg y
383383 => FromValue ('PGvararray ('Null pg)) (Vector (Maybe y)) where
384− fromValue _ = Decoding.array
384+ fromValue = Decoding.array
385385 (Decoding.dimensionArray Vector.replicateM
386− (Decoding.nullableValueArray (fromValue (Proxy @pg))))
386+ (Decoding.nullableValueArray (fromValue @pg)))
387387instance FromValue pg y
388388 => FromValue ('PGvararray ('NotNull pg)) (Vector y) where
389− fromValue _ = Decoding.array
389+ fromValue = Decoding.array
390390 (Decoding.dimensionArray Vector.replicateM
391− (Decoding.valueArray (fromValue (Proxy @pg))))
391+ (Decoding.valueArray (fromValue @pg)))
392392instance FromValue pg y
393393 => FromValue ('PGfixarray n ('Null pg)) (Vector (Maybe y)) where
394− fromValue _ = Decoding.array
394+ fromValue = Decoding.array
395395 (Decoding.dimensionArray Vector.replicateM
396− (Decoding.nullableValueArray (fromValue (Proxy @pg))))
396+ (Decoding.nullableValueArray (fromValue @pg)))
397397instance FromValue pg y
398398 => FromValue ('PGfixarray n ('NotNull pg)) (Vector y) where
399− fromValue _ = Decoding.array
399+ fromValue = Decoding.array
400400 (Decoding.dimensionArray Vector.replicateM
401− (Decoding.valueArray (fromValue (Proxy @pg))))
401+ (Decoding.valueArray (fromValue @pg)))
402402instance
403403 ( IsEnumType y
404404 , HasDatatypeInfo y
405405 , LabelsFrom y ~ labels
406406 ) => FromValue ('PGenum labels) y where
407− fromValue _ =
407+ fromValue =
408408 let
409409 greadConstructor
410410 :: All ((~) '[]) xss
@@ -425,7 +425,7 @@ instance
425425instance
426426 ( FromRow fields y
427427 ) => FromValue ('PGcomposite fields) y where
428− fromValue p =
428+ fromValue =
429429 let
430430 -- <number of fields: 4 bytes>
431431 -- [for each field]
@@ -438,11 +438,10 @@ instance
438438 -- [end if]
439439 -- [end for]
440440 composite
441− :: forall proxy pgs. SListI pgs
442− => proxy ('PGcomposite pgs)
443− -> Strict.ByteString
441+ :: forall pgs. SListI pgs
442+ => Strict.ByteString
444443 -> Either Strict.Text (NP (K (Maybe Strict.ByteString)) pgs)
445− composite _ = Decoding.valueParser $ do
444+ composite = Decoding.valueParser $ do
446445 unitOfSize 4
447446 let
448447 each _ = do
@@ -453,7 +452,7 @@ instance
453452 else K . Just <$> bytesOfSize len
454453 htraverse' each (hpure Proxy :: NP Proxy pgs)
455454 in
456− Decoding.fn (fromRow @fields @y <=< composite p)
455+ Decoding.fn (fromRow @fields @y <=< composite)
457456
458457-- | A `FromField` constraint lifts the `FromValue` parser
459458-- to a decoding of a @(Symbol, NullityType)@ to a `Type`,
@@ -468,13 +467,13 @@ instance FromValue pg y
468467 fromField = Comp . \case
469468 K Nothing -> Left "fromField: saw NULL when expecting NOT NULL"
470469 K (Just bytestring) -> P <$>
471− Decoding.valueParser (fromValue @pg @y Proxy) bytestring
470+ Decoding.valueParser (fromValue @pg @y) bytestring
472471instance FromValue pg y
473472 => FromField (column ::: 'Null pg) (column ::: Maybe y) where
474473 fromField = Comp . \case
475474 K Nothing -> Right $ P Nothing
476475 K (Just bytestring) -> P . Just <$>
477− Decoding.valueParser (fromValue @pg @y Proxy) bytestring
476+ Decoding.valueParser (fromValue @pg @y) bytestring
478477
479478-- | A `FromRow` constraint generically sequences the parsings of the columns
480479-- of a `RelationType` into the fields of a record `Type` provided they have