WIP moving back to snap.

[?]
Dec 3, 2014, 12:31 AM
EMVTF2IWNQGRL44FC4JNG5FYYQTZSFPNM6SOM7IAEH6T7PPK2NVAC

Dependencies

  • [2] FRPWIKCN Added log event parsing to Quixotic.Database.SQLite
  • [3] NTPC7KJE Trivial changes, feature scratchpad.
  • [4] WZUHEZSB Start of migration back toward snap.
  • [5] 64C6AWH6 Rename Ananke -> Quixotic, project reboot.
  • [6] Y35QCWYW Minor improvement in WorkIndex type to eliminate duplicated information.
  • [7] P6NR2CGX Beginning of implementation of depreciation.
  • [8] A2J7B4SC Initial impl of depreciation function.
  • [9] 2KZPOGRB Once you get Haskell to compile, the tests pass!
  • [10] JUUMYIQE Add groupBy utility function for use in TimeLog.
  • [11] 7DBNV3GV Initial, stack-based impl of time log event reduction.
  • [12] 4QX5E5AC Initial compilation of payouts function succeeds.
  • [13] GKGVYBZG Added JSON serialization to TimeLog
  • [14] RSEB2NFG Replacing Snap with Scotty.
  • [15] 5W5M56VJ Move library code to 'lib'
  • [16] NVOCQVAS Initial failing tests.
  • [17] 2OIPAQCB Merge branch 'master' of github.com:nuttycom/ananke
  • [18] TJEUE7TY Added OverloadedStrings to eliminate Text fiddling.
  • [19] NMWWP4ZN Trying out Hspec
  • [20] 64VI73NP Server now compiles using abstracted SQLite
  • [21] EQXRXRZD Changed to use tasty instead of test-framework
  • [22] Z3M53KTL Adrift.
  • [23] ADMKQQGC Initial empty Snap project.

Change contents

  • replacement in lib/Quixotic/Database/SQLite.hs at line 1
    [5.3612][5.1092:1148]()
    {-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-}
    [5.3612]
    [5.1148]
    {-# LANGUAGE ScopedTypeVariables, OverloadedStrings, NoImplicitPrelude #-}
  • replacement in lib/Quixotic/Database/SQLite.hs at line 5
    [5.3664][5.3664:3685]()
    import Control.Monad
    [5.3664]
    [5.3685]
    import ClassyPrelude
  • edit in lib/Quixotic/Database/SQLite.hs at line 7
    [5.3719][2.4:34](),[2.34][5.3719:3798](),[5.3719][5.3719:3798]()
    import Data.Maybe (catMaybes)
    import qualified Data.Text as T
    import Data.Time.Clock
    import Data.Time.Format
  • edit in lib/Quixotic/Database/SQLite.hs at line 8
    [5.3821]
    [5.3821]
  • edit in lib/Quixotic/Database/SQLite.hs at line 12
    [5.3901][5.1150:1191]()
    import System.Locale (defaultTimeLocale)
  • replacement in lib/Quixotic/Database/SQLite.hs at line 20
    [5.4160][5.4160:4231](),[5.4231][3.1566:1637]()
    void $ insertRow h "workEvents" [ ("btcAddr", T.unpack (address ba))
    , ("event", T.unpack (eventName ev))
    [5.4160]
    [5.4291]
    void $ insertRow h "workEvents" [ ("btcAddr", unpack (address ba))
    , ("event", unpack (eventName ev))
  • replacement in lib/Quixotic/Database/SQLite.hs at line 24
    [5.4372][5.1308:1369]()
    readWorkIndex :: SQLiteHandle -> EitherT T.Text IO WorkIndex
    [5.4372]
    [5.4433]
    readWorkIndex :: SQLiteHandle -> EitherT Text IO WorkIndex
  • replacement in lib/Quixotic/Database/SQLite.hs at line 27
    [5.1467][5.1467:1511]()
    rows <- bimapEitherT T.pack id baseResult
    [5.1467]
    [2.35]
    rows <- bimapEitherT pack id baseResult
  • replacement in lib/Quixotic/Database/SQLite.hs at line 38
    [2.349][2.349:394]()
    valueAddr (Text t) = parseBtcAddr $ T.pack t
    [2.349]
    [2.394]
    valueAddr (Text t) = parseBtcAddr $ pack t
  • edit in lib/Quixotic/Database.hs at line 1
    [5.4936]
    [5.4937]
    {-# LANGUAGE NoImplicitPrelude #-}
  • edit in lib/Quixotic/Interval.hs at line 1
    [5.1422]
    [5.5237]
    {-# LANGUAGE NoImplicitPrelude #-}
  • edit in lib/Quixotic/Interval.hs at line 7
    [5.1494]
    [5.1494]
    import ClassyPrelude
  • replacement in lib/Quixotic/TimeLog.hs at line 1
    [5.846][5.1690:1746]()
    {-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-}
    [5.846]
    [5.883]
    {-# LANGUAGE ScopedTypeVariables, OverloadedStrings, NoImplicitPrelude #-}
  • replacement in lib/Quixotic/TimeLog.hs at line 17
    [5.998][5.5372:5413](),[5.5413][5.4:52](),[5.1808][5.4:52](),[5.82][5.76:98](),[5.1808][5.76:98](),[5.98][5.2621:2644]()
    import Quixotic
    import Quixotic.Interval
    import Control.Applicative
    import Control.Monad
    import Data.Bifunctor
    import Data.Function()
    [5.998]
    [5.168]
    import ClassyPrelude
  • replacement in lib/Quixotic/TimeLog.hs at line 21
    [5.91][5.91:119]()
    import Data.Map.Strict as M
    [5.91]
    [5.2645]
    import Data.Map.Strict as MS
  • replacement in lib/Quixotic/TimeLog.hs at line 25
    [5.122][5.122:154]()
    import qualified Data.Text as T
    [5.122]
    [5.1224]
    import Quixotic
    import Quixotic.Interval
  • replacement in lib/Quixotic/TimeLog.hs at line 32
    [5.5415][3.1727:1760]()
    eventName :: WorkEvent -> T.Text
    [5.5415]
    [5.5448]
    eventName :: WorkEvent -> Text
  • replacement in lib/Quixotic/TimeLog.hs at line 38
    [5.365][5.365:406]()
    t <- jv .: "type" :: A.Parser T.Text
    [5.365]
    [5.406]
    t <- jv .: "type" :: A.Parser Text
  • replacement in lib/Quixotic/TimeLog.hs at line 82
    [5.1052][5.1052:1142](),[5.1142][5.155:213]()
    (totalTime, keyTimes) = M.mapAccum addIntervalDiff (fromInteger 0) $ M.map snd widx
    in M.map (\kt -> toRational $ kt / totalTime) keyTimes
    [5.1052]
    [5.1011]
    (totalTime, keyTimes) = MS.mapAccum addIntervalDiff (fromInteger 0) $ MS.map snd widx
    in MS.map (\kt -> toRational $ kt / totalTime) keyTimes
  • replacement in lib/Quixotic/TimeLog.hs at line 103
    [5.966][5.966:1024](),[5.1024][5.214:276]()
    let logSum = F.foldl' appendLogEntry M.empty logEntries
    in M.map (bimap (fmap event) (fmap workInterval)) $ logSum
    [5.966]
    [5.448]
    let logSum = F.foldl' appendLogEntry MS.empty logEntries
    in MS.map (bimap (fmap event) (fmap workInterval)) $ logSum
  • replacement in lib/Quixotic/TimeLog.hs at line 114
    [5.2318][5.120:198](),[5.721][5.120:198]()
    pushEntry entry = first (entry :) . findWithDefault ([], []) (btcAddr entry)
    [5.2318]
    [5.869]
    pushEntry entry = first (entry :) . MS.findWithDefault ([], []) (btcAddr entry)
  • edit in lib/Quixotic.hs at line 1
    [5.2457]
    [5.5553]
    {-# LANGUAGE NoImplicitPrelude #-}
  • edit in lib/Quixotic.hs at line 8
    [5.2516]
    [5.2516]
    import ClassyPrelude
  • edit in lib/Quixotic.hs at line 13
    [5.1787][5.1787:1808]()
    import Control.Monad
  • replacement in quixotic.cabal at line 23
    [5.751][5.1:28]()
    build-depends: base
    [5.751]
    [5.805]
    build-depends: base >= 4 && < 5
  • edit in quixotic.cabal at line 25
    [5.838]
    [5.838]
    , classy-prelude >= 0.10.2
  • replacement in quixotic.cabal at line 57
    [4.71][4.71:119]()
    , base >= 4 && < 5
    [4.71]
    [4.119]
    , base
    , classy-prelude >= 0.10.2
  • edit in server/Api/WorkLog.hs at line 1
    [4.564]
    [4.565]
    {-# LANGUAGE NoImplicitPrelude #-}
  • edit in server/Api/WorkLog.hs at line 5
    [4.602]
    [4.602]
    import ClassyPrelude
  • edit in server/Api/WorkLog.hs at line 28
    [4.1438][4.1438:1439]()
  • replacement in server/Main.hs at line 1
    [5.5188][5.33:89]()
    {-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-}
    [5.5188]
    [5.5255]
    {-# LANGUAGE ScopedTypeVariables, OverloadedStrings, NoImplicitPrelude #-}
  • edit in server/Main.hs at line 4
    [5.1340]
    [5.5259]
    import ClassyPrelude
  • replacement in server/Main.hs at line 62
    [4.2211][4.2211:2305]()
    buildPayoutsResponse widx = writeBS . encode . PayoutsResponse $ payouts dep ptime widx
    [4.2211]
    [5.6168]
    buildPayoutsResponse widx = writeBS . A.encode . PayoutsResponse $ payouts dep ptime widx
  • replacement in test/Ananke/TimeLogSpec.hs at line 1
    [5.3665][5.2:58]()
    {-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
    [5.3665]
    [5.148]
    {-# LANGUAGE OverloadedStrings, ScopedTypeVariables, NoImplicitPrelude #-}
  • edit in test/Ananke/TimeLogSpec.hs at line 4
    [5.5607]
    [5.2656]
    import ClassyPrelude