on cac01c8 help sign in
2 files changed+2−4
since splitsnapshots
unifiedsplit
src/Data/Money/Rel8.hs+1−3 test/Rel8Spec.hs+1−1
src/Data/Money/Rel8.hs+1−3
@@ -7,13 +7,11 @@ import Data.Money.Internal
77import Data.Scientific
88import Rel8
99
10−import Debug.Trace
11−
1210instance DBType (Money curr) where
1311 typeInformation =
1412 let sci = typeInformation @Scientific
1513 in TypeInformation { encode = encode sci . realToFrac . getAmount
1614 , decode = fmap (Money . realToFrac) (decode sci)
17− , typeName = "decimal"
15+ , typeName = "money"
1816 }
1917
test/Rel8Spec.hs+1−1
@@ -48,7 +48,7 @@ createConnection = throwLeft =<< Hasql.acquire dbsets
4848
4949createTable :: Connection -> IO ()
5050createTable conn = throwLeft =<< Hasql.run sql conn
51− where sql = Hasql.sql "CREATE TABLE bucks (amount decimal not null);"
51+ where sql = Hasql.sql "CREATE TABLE bucks (amount money not null);"
5252
5353dropTable :: Connection -> IO ()
5454dropTable conn = throwLeft =<< Hasql.run sql conn