@@ -759,9 +759,8 @@ withParams params action =
759
759
withArray formats $ \ fs ->
760
760
action n ts vs ls fs
761
761
where
762
- (oids, values, lengths , formats) =
762
+ (oids, values, c_lengths , formats) =
763
763
foldl' accum ([] ,[] ,[] ,[] ) $ reverse params
764
- ! c_lengths = map toEnum lengths :: [CInt ]
765
764
! n = toEnum $ length params
766
765
767
766
accum (! a,! b,! c,! d) Nothing = ( invalidOid: a
@@ -771,7 +770,7 @@ withParams params action =
771
770
)
772
771
accum (! a,! b,! c,! d) (Just (t,v,f)) = ( t: a
773
772
, (Just v): b
774
- , (B. length v): c
773
+ , (toEnum $ B. length v): c
775
774
, (toEnum $ fromEnum f): d
776
775
)
777
776
@@ -787,16 +786,15 @@ withParamsPrepared params action =
787
786
withArray formats $ \ fs ->
788
787
action n vs ls fs
789
788
where
790
- (values, lengths, formats) = foldl' accum ([] ,[] ,[] ) $ reverse params
791
- ! c_lengths = map toEnum lengths :: [CInt ]
789
+ (values, c_lengths, formats) = foldl' accum ([] ,[] ,[] ) $ reverse params
792
790
! n = toEnum $ length params
793
791
794
792
accum (! a,! b,! c) Nothing = ( Nothing : a
795
793
, 0 : b
796
794
, 0 : c
797
795
)
798
796
accum (! a,! b,! c) (Just (v, f)) = ( (Just v): a
799
- , (B. length v): b
797
+ , (toEnum $ B. length v): b
800
798
, (toEnum $ fromEnum f): c
801
799
)
802
800
0 commit comments