Finish conversion to stack.

[?]
Feb 20, 2016, 5:40 AM
EKY7U7SKPF45OOUAHJBEQKXSUXWOHFBQFFVJWPBN5ARFJUFM2BPAC

Dependencies

  • [2] ZP62WC47 Begin conversion to build with stack.
  • [3] KNSI575V Cleanup of EventLog types.
  • [4] RPAJLHMT Change to use UUIDs instead of ints for primary keys.
  • [5] 2XQD6KKK Add invitation logic and clean up DBProg error handling.
  • [6] Z7KS5XHH Very WIP. Wow.
  • [7] TNR3TEHK Switch to Postgres + snaplet arch compiles.
  • [8] 7KZP4RHZ Switch from Data.Time to Data.Thyme
  • [9] GCVQD44V Create amends endpoint, switch to UUID primary keys
  • [10] 4U7F3CPI THE GREAT RENAMING OF THINGS!
  • [11] 7HPY3QPF Fix linting errors. (yay hlint!)
  • [12] IZEVQF62 Work in progress replacing sqlite with postgres.
  • [13] QMRKFEPG Refactor QDB to use a free monad algebra instead.

Change contents

  • edit in lib/Aftok/Database/PostgreSQL.hs at line 5
    [3.623][3.623:672]()
    import Blaze.ByteString.Builder (fromByteString)
  • edit in lib/Aftok/Database/PostgreSQL.hs at line 10
    [3.38][3.713:731](),[3.117][3.713:731](),[3.1801][3.713:731](),[3.713][3.713:731]()
    import Data.Fixed
  • edit in lib/Aftok/Database/PostgreSQL.hs at line 16
    [3.820][3.820:862]()
    import Database.PostgreSQL.Simple.ToField
  • replacement in lib/Aftok/Database/PostgreSQL.hs at line 73
    [2.510][3.4:51](),[3.1575][3.4:51]()
    btcParser f v = fromRational <$> fromField f v
    [2.510]
    [3.57]
    btcParser f v = (Satoshi . fromInteger) <$> fromField f v
  • edit in lib/Aftok/Database/PostgreSQL.hs at line 78
    [3.272][2.511:665](),[2.665][3.223:224](),[3.223][3.223:224]()
    newtype PSatoshi = PSatoshi Satoshi
    instance ToField PSatoshi where
    toField (PSatoshi btc) = Plain . fromByteString . fromString $ showFixed False btc
  • replacement in lib/Aftok/Database/PostgreSQL.hs at line 87
    [3.383][3.554:614](),[3.554][3.554:614]()
    <*> fieldWith uidParser
    <*> logEntryParser
    [3.383]
    [3.614]
    <*> fieldWith uidParser
    <*> logEntryParser
  • replacement in lib/Aftok/Database/PostgreSQL.hs at line 92
    [3.669][3.2105:2144]()
    Auction <$> (fromRational <$> field)
    [3.669]
    [3.2144]
    Auction <$> fieldWith btcParser
  • replacement in lib/Aftok/Database/PostgreSQL.hs at line 214
    [3.3162][2.666:760]()
    (pid ^. _ProjectId, auc ^. (raiseAmount.to PSatoshi), auc ^. (auctionEnd.to fromThyme))
    [3.3162]
    [3.5182]
    (pid ^. _ProjectId, auc ^. (raiseAmount.to fromSatoshi), auc ^. (auctionEnd.to fromThyme))
  • replacement in lib/Aftok/Database/PostgreSQL.hs at line 228
    [3.3733][2.761:800]()
    , bid ^. (bidAmount.to PSatoshi)
    [3.3733]
    [3.3080]
    , bid ^. (bidAmount.to fromSatoshi)
  • replacement in lib/Aftok/Types.hs at line 8
    [2.913][2.913:946]()
    newtype Satoshi = Satoshi Word64
    [2.913]
    [2.946]
    newtype Satoshi = Satoshi { fromSatoshi :: Word64 }