git.iko.soy/typeable/postgresql-simple
on master help sign in
Allow conversion of int8 to Rational and Scientific
commit1f9f5407fd7fd9f4f233976ebc25a22427ab386d authorLeon P Smith <leon@melding-monads.com> dateWed 15 Jul 2015, 11:22 (11 years ago) parent52ba5da
1 file changed+4−4
src/Database/PostgreSQL/Simple/FromField.hs+4−4
src/Database/PostgreSQL/Simple/FromField.hs+4−4
@@ -335,15 +335,15 @@ instance FromField Double where
335335 fromField = atto ok pg_double
336336 where ok = $(mkCompats [TI.float4,TI.float8,TI.int2,TI.int4])
337337
338−-- | int2, int4, float4, float8, numeric
338+-- | int2, int4, int8, float4, float8, numeric
339339instance FromField (Ratio Integer) where
340340 fromField = atto ok pg_rational
341− where ok = $(mkCompats [TI.float4,TI.float8,TI.int2,TI.int4,TI.numeric])
341+ where ok = $(mkCompats [TI.float4,TI.float8,TI.int2,TI.int4,TI.int8,TI.numeric])
342342
343−-- | int2, int4, float4, float8, numeric
343+-- | int2, int4, int8, float4, float8, numeric
344344instance FromField Scientific where
345345 fromField = atto ok rational
346− where ok = $(mkCompats [TI.float4,TI.float8,TI.int2,TI.int4,TI.numeric])
346+ where ok = $(mkCompats [TI.float4,TI.float8,TI.int2,TI.int4,TI.int8,TI.numeric])
347347
348348unBinary :: Binary t -> t
349349unBinary (Binary x) = x