Skip to content

Commit 1e3cac6

Browse files
Fix Numeric Hashable to use Scientific's Hashable instance
Co-authored-by: nikita-volkov <1560937+nikita-volkov@users.noreply.github.com>
1 parent 400801f commit 1e3cac6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library/PostgresqlTypes/Numeric.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ instance (TypeLits.KnownNat precision, TypeLits.KnownNat scale) => Arbitrary (Nu
108108
instance Hashable (Numeric precision scale) where
109109
hashWithSalt salt = \case
110110
NegInfinityNumeric -> salt `hashWithSalt` (0 :: Int)
111-
ScientificNumeric s -> salt `hashWithSalt` (1 :: Int) `hashWithSalt` Scientific.coefficient s `hashWithSalt` Scientific.base10Exponent s
111+
ScientificNumeric s -> salt `hashWithSalt` (1 :: Int) `hashWithSalt` s
112112
PosInfinityNumeric -> salt `hashWithSalt` (2 :: Int)
113113
NanNumeric -> salt `hashWithSalt` (3 :: Int)
114114

0 commit comments

Comments
 (0)