on dev help sign in
unshadow
7b65fb1Eitan Chatav
squeal-postgresql/src/Squeal/PostgreSQL/Binary.hs+4−4
@@ -242,7 +242,7 @@ composite
242 :: SListI ys
242 :: SListI ys
243 => NP Decoding.Value ys
243 => NP Decoding.Value ys
244 -> Decoding.Value (NP Maybe ys)
244 -> Decoding.Value (NP Maybe ys)
245−composite decoders = do
245+composite fields = do
246-- [for each field]
246-- [for each field]
247-- <OID of field's type: sizeof(Oid) bytes>
247-- <OID of field's type: sizeof(Oid) bytes>
248-- [if value is NULL]
248-- [if value is NULL]
@@ -255,11 +255,11 @@ composite decoders = do
255-- <number of fields: 4 bytes>
255-- <number of fields: 4 bytes>
256 unitOfSize 4
256 unitOfSize 4
257 let
257 let
258− each decoder = do
258+ each field = do
259 unitOfSize 4
259 unitOfSize 4
260 len <- sized 4 Decoding.int
260 len <- sized 4 Decoding.int
261− if len == -1 then return Nothing else Just <$> sized len decoder
261+ if len == -1 then return Nothing else Just <$> sized len field
262− htraverse' each decoders
262+ htraverse' each fields
263
263
264-- | A `FromColumnValue` constraint lifts the `FromValue` parser
264-- | A `FromColumnValue` constraint lifts the `FromValue` parser
265-- to a decoding of a @(Symbol, ColumnType)@ to a `Type`,
265-- to a decoding of a @(Symbol, ColumnType)@ to a `Type`,