Merge branch 'master' of github.com:nuttycom/ananke
[?]
Mar 26, 2014, 4:06 AM
2OIPAQCBDIUJBXB4K2QVP3IEBIUOCQHSWSWFVMVSVZC7GHX2VK7ACDependencies
- [2]
GKGVYBZGAdded JSON serialization to TimeLog - [3]
A2J7B4SCInitial impl of depreciation function. - [4]
NVOCQVASInitial failing tests. - [5]
JUUMYIQEAdd groupBy utility function for use in TimeLog. - [6]
7DBNV3GVInitial, stack-based impl of time log event reduction. - [7]
2KZPOGRBOnce you get Haskell to compile, the tests pass! - [8]
4QX5E5ACInitial compilation of payouts function succeeds. - [9]
P6NR2CGXBeginning of implementation of depreciation. - [10]
Y35QCWYWMinor improvement in WorkIndex type to eliminate duplicated information. - [11]
N4NDAZYTInitial implementation of payouts. - [12]
EQXRXRZDChanged to use tasty instead of test-framework
Change contents
- edit in src/Ananke/TimeLog.hs at line 16
import Control.Applicativeimport Control.Monadimport Control.Exception.Base - edit in src/Ananke/TimeLog.hs at line 22
import qualified Data.Aeson.Types as A - edit in src/Ananke/TimeLog.hs at line 24
import qualified Data.Text as T - edit in src/Ananke/TimeLog.hs at line 27
import qualified Data.Aeson.Types as Aimport qualified Data.Text as T - edit in src/Ananke/TimeLog.hs at line 31[4.200]→[4.1167:1194](∅→∅),[4.1167]→[4.1167:1194](∅→∅),[4.1194]→[2.259:280](∅→∅),[4.24]→[4.1194:1224](∅→∅),[2.280]→[4.1194:1224](∅→∅),[4.1194]→[4.1194:1224](∅→∅)
import Control.Applicativeimport Control.Monadimport Control.Exception.Base - replacement in src/Ananke/TimeLog.hs at line 83
in M.map (\kt -> toRational $ kt / totalTime) keyTimesin M.map (\kt -> toRational $ kt / totalTime) keyTimes - replacement in src/Ananke/TimeLog.hs at line 104
in M.map (bimap (fmap event) (fmap workInterval)) $ logSumin M.map (bimap (fmap event) (fmap workInterval)) $ logSum - replacement in src/Ananke/TimeLog.hs at line 111
in insert (btcAddr entry) acc workIndexin insert (btcAddr entry) acc workIndex - resurrect zombie in src/Ananke/TimeLog.hs at line 121
newtype Months = Months IntegermonthsLength :: Months -> NominalDiffTimemonthsLength (Months i) = fromInteger $ 60 * 60 * 24 * 30 * ilinearDepreciation :: Months -> Months -> DepreciationlinearDepreciation undepPeriod depPeriod =let maxDepreciable :: NominalDiffTimemaxDepreciable = monthsLength undepPeriod + monthsLength depPeriod - resolve order conflict in src/Ananke/TimeLog.hs at line 121
- edit in src/Ananke/TimeLog.hs at line 131
zeroTime :: NominalDiffTimezeroTime = fromInteger 0 - edit in src/Ananke/TimeLog.hs at line 135
let depf ndt = undefined - resurrect zombie in src/Ananke/TimeLog.hs at line 135
in Depreciation depf-- data LogEventParseError = LogEventParseError String deriving (Show, Typeable)-- instance Exception LogEventParseError where-- instance FromField WorkEvent where-- fromField f m = let fromText "start_work" = return StartWork-- fromText "stop_work" = return StopWork-- fromText a = conversionError $ LogEventParseError $ "unrecognized log event type " ++ a-- in fromField f m >>= fromText-- instance FromRow LogEntry where-- fromRow = LogEntry <$> field <*> field <*> field - edit in src/Ananke/TimeLog.hs at line 135
depf :: NominalDiffTime -> Rationaldepf dt = if dt < monthsLength undepPeriodthen 1else toRational (max zeroTime (maxDepreciable - dt)) / toRational maxDepreciable - edit in src/Ananke/TimeLog.hs at line 152
zeroTime :: NominalDiffTimezeroTime = fromInteger 0 - resolve order conflict in src/Ananke/TimeLog.hs at line 152
- edit in src/Ananke/TimeLog.hs at line 153
depf :: NominalDiffTime -> Rationaldepf dt = if dt < monthsLength undepPeriodthen 1else toRational (max zeroTime (maxDepreciable - dt)) / toRational maxDepreciablein Depreciation depf