Convert project to stack-based build.

[?]
Feb 20, 2016, 5:41 AM
KEP5WUFJXTMKRRNZLYTGYYWA4VLFCMHTKTJYF5EA5IWBYFMU6WYQC

Dependencies

  • [2] 7HPY3QPF Fix linting errors. (yay hlint!)
  • [3] 75N3UJ4J More progression toward lenses.
  • [4] RPAJLHMT Change to use UUIDs instead of ints for primary keys.
  • [5] TLQ72DSJ Lenses, sqlite-simple
  • [6] QMRKFEPG Refactor QDB to use a free monad algebra instead.
  • [7] 4U7F3CPI THE GREAT RENAMING OF THINGS!
  • [8] KNSI575V Cleanup of EventLog types.
  • [9] IZEVQF62 Work in progress replacing sqlite with postgres.
  • [10] LAROLAYU WIP
  • [11] Z7KS5XHH Very WIP. Wow.
  • [12] WO2MINIF Auctions now compile!
  • [13] 7KZP4RHZ Switch from Data.Time to Data.Thyme
  • [14] WZUHEZSB Start of migration back toward snap.
  • [15] GCVQD44V Create amends endpoint, switch to UUID primary keys
  • [16] 2XQD6KKK Add invitation logic and clean up DBProg error handling.
  • [17] 5DRIWGLU Improving TimeLog specs
  • [18] TNR3TEHK Switch to Postgres + snaplet arch compiles.
  • [19] BROSTG5K Beginning of modularization of server.
  • [20] MWUPXTBF A few steps down a road to be abandoned.
  • [21] OBFPJS2G Project successfully builds and tests under nix.
  • [*] ADMKQQGC Initial empty Snap project.
  • [*] PGZJ736C Update aftok.cfg.example and revise INSTALL instructions
  • [*] 64C6AWH6 Rename Ananke -> Quixotic, project reboot.
  • [*] A6HKMINB Attempting to improve JSON handling.
  • [*] AXKKXBWN Initial attempt at writing down my ideas for a company based on trust.

Change contents

  • edit in .gitignore at line 4
    [24.27]
    [24.27]
    .stack-work
  • replacement in aftok.cabal at line 35
    [3.316][3.316:387]()
    , aeson == 0.8.*
    , attoparsec == 0.12.*
    [3.316]
    [3.387]
    , aeson == 0.9.*
    , attoparsec == 0.13.*
  • replacement in aftok.cabal at line 44
    [3.494][3.494:541]()
    , errors >= 1.4 && < 1.5
    [3.494]
    [3.35]
    , errors == 2.1.*
  • replacement in aftok.cabal at line 51
    [3.68][3.686:781]()
    , lens >= 4.11 && < 4.12
    , network-bitcoin >= 1.8 && < 1.9
    [3.68]
    [3.781]
    , lens >= 4.11
    --, network-bitcoin >= 1.8 && < 1.9
  • replacement in aftok.cabal at line 54
    [3.815][3.815:862]()
    , postgresql-simple >= 0.4.10 && < 0.5
    [3.815]
    [3.862]
    , postgresql-simple == 0.5.*
  • edit in aftok.cabal at line 132
    [3.1612][3.3217:3218](),[3.7402][3.3217:3218](),[3.7495][3.3217:3218](),[3.545][3.3217:3218](),[3.3218][3.519:544](),[3.544][3.3246:3346](),[3.3246][3.3246:3346](),[3.3346][3.547:707](),[3.707][3.3346:3399](),[3.3346][3.3346:3399](),[3.3399][3.545:557](),[3.557][3.3414:3567](),[3.3414][3.3414:3567](),[3.3567][3.2978:2990](),[3.2990][3.3578:3698](),[3.3578][3.3578:3698]()
    Executable aftok-payouts
    default-language: Haskell2010
    ghc-options: -Wall -Werror
    hs-source-dirs: payouts
    default-extensions: NoImplicitPrelude
    , OverloadedStrings
    , RecordWildCards
    , ScopedTypeVariables
    main-is: Main.hs
    build-depends:
    aftok
    , base
    , classy-prelude >= 0.10.2
    , containers
    , either
    , mtl >= 2 && < 3
    , lens
    , text
    , thyme
    , vector
    , transformers
    , configurator
    , optparse-applicative
    , bytestring
    , network-bitcoin
  • edit in lib/Aftok/Auction.hs at line 10
    [3.20][3.3:26](),[3.1645][3.3:26](),[3.43][3.3:26]()
    import Network.Bitcoin
  • edit in lib/Aftok/Auction.hs at line 12
    [3.775]
    [3.5213]
    import Aftok.Types
  • replacement in lib/Aftok/Auction.hs at line 18
    [3.5273][3.117:141]()
    { _raiseAmount :: BTC
    [3.5273]
    [3.1646]
    { _raiseAmount :: Satoshi
  • replacement in lib/Aftok/Auction.hs at line 29
    [3.142][3.142:165]()
    , _bidAmount :: BTC
    [3.142]
    [3.1677]
    , _bidAmount :: Satoshi
  • replacement in lib/Aftok/Auction.hs at line 45
    [3.397][3.397:444]()
    let takeWinningBids :: BTC -> [Bid] -> [Bid]
    [3.397]
    [3.444]
    let takeWinningBids :: Satoshi -> [Bid] -> [Bid]
  • replacement in lib/Aftok/Auction.hs at line 54
    [3.333][3.333:403]()
    winFraction = toRational $ remainder / (x ^. bidAmount)
    [3.333]
    [2.64]
    winFraction = toRational remainder / toRational (x ^. bidAmount)
  • 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
  • edit in lib/Aftok/Database/PostgreSQL.hs at line 18
    [3.988][3.988:1011]()
    import Network.Bitcoin
  • edit in lib/Aftok/Database/PostgreSQL.hs at line 24
    [3.1201]
    [26.1123]
    import Aftok.Types
  • replacement in lib/Aftok/Database/PostgreSQL.hs at line 72
    [3.1546][3.1546:1575](),[3.1575][3.4:51]()
    btcParser :: FieldParser BTC
    btcParser f v = fromRational <$> fromField f v
    [3.1546]
    [3.57]
    btcParser :: FieldParser Satoshi
    btcParser f v = (Satoshi . fromInteger) <$> fromField f v
  • edit in lib/Aftok/Database/PostgreSQL.hs at line 78
    [3.272][3.161:186](),[3.2338][3.161:186](),[3.186][3.2374:2483](),[3.2374][3.2374:2483](),[3.223][3.223:224]()
    newtype PBTC = PBTC BTC
    instance ToField PBTC where
    toField (PBTC 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.451:541]()
    (pid ^. _ProjectId, auc ^. (raiseAmount.to PBTC), 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][3.3733:3768]()
    , bid ^. (bidAmount.to PBTC)
    [3.3733]
    [3.3080]
    , bid ^. (bidAmount.to fromSatoshi)
  • file addition: Types.hs (----------)
    [3.679]
    {-# LANGUAGE GeneralizedNewtypeDeriving #-}
    module Aftok.Types where
    import Data.Word
    import ClassyPrelude
    newtype Satoshi = Satoshi { fromSatoshi :: Word64 }
    deriving (Show, Eq, Ord, Num, Real, Bounded)
  • file addition: stack.yaml (----------)
    [27.2]
    flags: {}
    packages:
    - '.'
    extra-deps:
    - snaplet-postgresql-simple-0.6.0.4
    - resource-pool-catchio-0.2.1.0
    resolver: lts-5.3
    #allow-newer: true