on master help sign in
2 files changed+4−2
since splitsnapshots
unifiedsplit
src/Data/Money/Rel8.hs+3−1 test/Rel8Spec.hs+1−1
src/Data/Money/Rel8.hs+3−1
@@ -7,11 +7,13 @@ import Data.Money.Internal
77import Data.Scientific
88import Rel8
99
10+import Debug.Trace
11+
1012instance DBType (Money curr) where
1113 typeInformation =
1214 let sci = typeInformation @Scientific
1315 in TypeInformation { encode = encode sci . realToFrac . getAmount
1416 , decode = fmap (Money . realToFrac) (decode sci)
15− , typeName = "money"
17+ , typeName = "decimal"
1618 }
1719
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 money not null);"
51+ where sql = Hasql.sql "CREATE TABLE bucks (amount decimal not null);"
5252
5353dropTable :: Connection -> IO ()
5454dropTable conn = throwLeft =<< Hasql.run sql conn