build checks.x86_64-linux.mutation-really-safe-money

Reproduce this run
  1. 1033.53 s [really-safe-money-gen] floored = (floor :: Double -> Natural) resultDouble
  2. 1033.55 s [really-safe-money-gen] in if ceiled == floored
  3. 1033.55 s [really-safe-money-gen] then
  4. 1033.55 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  5. 1033.56 s [really-safe-money-gen] + if ceiled < (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  6. 1033.56 s [really-safe-money-gen] then Nothing
  7. 1033.56 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  8. 1033.56 s [really-safe-money-gen] else Nothing
  9. 1033.56 s [really-safe-money-gen] Testing mutation Negate at src/Money/Amount.hs:320:5-10
  10. 1033.56 s [really-safe-money-gen] @@ -317,7 +317,7 @@
  11. 1033.56 s [really-safe-money-gen] Double ->
  12. 1033.56 s [really-safe-money-gen] Maybe Amount
  13. 1033.56 s [really-safe-money-gen] fromDouble (QuantisationFactor qf) d
  14. 1033.56 s [really-safe-money-gen] - | d < 0 = Nothing
  15. 1033.56 s [really-safe-money-gen] + | not (d < 0) = Nothing
  16. 1033.56 s [really-safe-money-gen] | otherwise =
  17. 1033.56 s [really-safe-money-gen] let resultDouble :: Double
  18. 1033.56 s [really-safe-money-gen] resultDouble = d * (fromIntegral :: Word32 -> Double) qf
  19. 1033.56 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:341:26-91
  20. 1033.56 s [really-safe-money-gen] @@ -338,7 +338,7 @@
  21. 1033.56 s [really-safe-money-gen] floored = (floor :: Double -> Natural) resultDouble
  22. 1033.56 s [really-safe-money-gen] in if ceiled == floored
  23. 1033.56 s [really-safe-money-gen] then
  24. 1033.56 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  25. 1033.56 s [really-safe-money-gen] + if True
  26. 1033.56 s [really-safe-money-gen] then Nothing
  27. 1033.56 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  28. 1033.56 s [really-safe-money-gen] else Nothing
  29. 1033.56 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:323:26-67
  30. 1033.56 s [really-safe-money-gen] @@ -320,7 +320,7 @@
  31. 1033.56 s [really-safe-money-gen] | d < 0 = Nothing
  32. 1033.56 s [really-safe-money-gen] | otherwise =
  33. 1033.56 s [really-safe-money-gen] let resultDouble :: Double
  34. 1033.57 s [really-safe-money-gen] - resultDouble = d * (fromIntegral :: Word32 -> Double) qf
  35. 1033.57 s [really-safe-money-gen] + resultDouble = d + (fromIntegral :: Word32 -> Double) qf
  36. 1033.57 s [really-safe-money-gen] in go resultDouble
  37. 1033.57 s [really-safe-money-gen] where
  38. 1033.57 s [really-safe-money-gen] go resultDouble
  39. 1033.57 s [really-safe-money-gen] Testing mutation Negate at src/Money/Amount.hs:341:26-91
  40. 1033.57 s [really-safe-money-gen] @@ -338,7 +338,7 @@
  41. 1033.57 s [really-safe-money-gen] floored = (floor :: Double -> Natural) resultDouble
  42. 1033.57 s [really-safe-money-gen] in if ceiled == floored
  43. 1033.57 s [really-safe-money-gen] then
  44. 1033.57 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  45. 1033.57 s [really-safe-money-gen] + if not (ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64))
  46. 1033.57 s [really-safe-money-gen] then Nothing
  47. 1033.57 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  48. 1033.57 s [really-safe-money-gen] else Nothing
  49. 1033.57 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:494:29-94
  50. 1033.57 s [really-safe-money-gen] @@ -491,7 +491,7 @@
  51. 1033.57 s [really-safe-money-gen] let maxBoundI :: Integer
  52. 1033.57 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  53. 1033.57 s [really-safe-money-gen] r :: Integer
  54. 1033.57 s [really-safe-money-gen] - r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  55. 1033.57 s [really-safe-money-gen] + r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) - acc) 0 l
  56. 1033.57 s [really-safe-money-gen] in if r > maxBoundI
  57. 1033.57 s [really-safe-money-gen] then Nothing
  58. 1033.57 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  59. 1033.57 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:495:10-23
  60. 1033.57 s [really-safe-money-gen] @@ -492,7 +492,7 @@
  61. 1033.57 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  62. 1033.57 s [really-safe-money-gen] r :: Integer
  63. 1033.57 s [really-safe-money-gen] r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  64. 1033.57 s [really-safe-money-gen] - in if r > maxBoundI
  65. 1033.57 s [really-safe-money-gen] + in if r < maxBoundI
  66. 1033.57 s [really-safe-money-gen] then Nothing
  67. 1033.57 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  68. 1033.57 s [really-safe-money-gen]
  69. 1033.57 s [really-safe-money-gen] Testing mutation IntLit at src/Money/Amount.hs:290:79-80
  70. 1033.57 s [really-safe-money-gen] @@ -287,7 +287,7 @@
  71. 1033.58 s [really-safe-money-gen] -- >>> toRatio (QuantisationFactor 100) (Amount 1)
  72. 1033.58 s [really-safe-money-gen] -- 1 % 100
  73. 1033.58 s [really-safe-money-gen] toRatio :: QuantisationFactor -> Amount -> Ratio Natural
  74. 1033.58 s [really-safe-money-gen] -toRatio (QuantisationFactor 0) a = fromIntegral (toMinimalQuantisations a) :% 0
  75. 1033.58 s [really-safe-money-gen] +toRatio (QuantisationFactor 0) a = fromIntegral (toMinimalQuantisations a) :% 1
  76. 1033.58 s [really-safe-money-gen] toRatio (QuantisationFactor quantisationFactor) a =
  77. 1033.58 s [really-safe-money-gen] (fromIntegral :: Word64 -> Natural) (toMinimalQuantisations a)
  78. 1033.58 s [really-safe-money-gen] % (fromIntegral :: Word32 -> Natural) quantisationFactor
  79. 1033.58 s [really-safe-money-gen] Testing mutation Negate at src/Money/Amount.hs:339:22-39
  80. 1033.58 s [really-safe-money-gen] @@ -336,7 +336,7 @@
  81. 1033.58 s [really-safe-money-gen] ceiled = (ceiling :: Double -> Natural) resultDouble
  82. 1033.58 s [really-safe-money-gen] floored :: Natural
  83. 1033.58 s [really-safe-money-gen] floored = (floor :: Double -> Natural) resultDouble
  84. 1033.58 s [really-safe-money-gen] - in if ceiled == floored
  85. 1033.58 s [really-safe-money-gen] + in if not (ceiled == floored)
  86. 1033.58 s [really-safe-money-gen] then
  87. 1033.58 s [really-safe-money-gen] if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  88. 1033.58 s [really-safe-money-gen] then Nothing
  89. 1033.58 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:495:10-23
  90. 1033.58 s [really-safe-money-gen] @@ -492,7 +492,7 @@
  91. 1033.58 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  92. 1033.58 s [really-safe-money-gen] r :: Integer
  93. 1033.58 s [really-safe-money-gen] r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  94. 1033.58 s [really-safe-money-gen] - in if r > maxBoundI
  95. 1033.58 s [really-safe-money-gen] + in if r <= maxBoundI
  96. 1033.58 s [really-safe-money-gen] then Nothing
  97. 1033.58 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  98. 1033.58 s [really-safe-money-gen]
  99. 1033.58 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:495:10-23
  100. 1033.58 s [really-safe-money-gen] @@ -492,7 +492,7 @@
  101. 1033.58 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  102. 1033.58 s [really-safe-money-gen] r :: Integer
  103. 1033.58 s [really-safe-money-gen] r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  104. 1033.58 s [really-safe-money-gen] - in if r > maxBoundI
  105. 1033.58 s [really-safe-money-gen] + in if True
  106. 1033.58 s [really-safe-money-gen] then Nothing
  107. 1033.58 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  108. 1033.58 s [really-safe-money-gen]
  109. 1033.58 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:341:26-91
  110. 1033.58 s [really-safe-money-gen] @@ -338,7 +338,7 @@
  111. 1033.58 s [really-safe-money-gen] floored = (floor :: Double -> Natural) resultDouble
  112. 1033.58 s [really-safe-money-gen] in if ceiled == floored
  113. 1033.58 s [really-safe-money-gen] then
  114. 1033.58 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  115. 1033.59 s [really-safe-money-gen] + if False
  116. 1033.59 s [really-safe-money-gen] then Nothing
  117. 1033.59 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  118. 1033.59 s [really-safe-money-gen] else Nothing
  119. 1033.59 s [really-safe-money-gen] Testing mutation IntLit at src/Money/Amount.hs:320:9-10
  120. 1033.59 s [really-safe-money-gen] @@ -317,7 +317,7 @@
  121. 1033.59 s [really-safe-money-gen] Double ->
  122. 1033.59 s [really-safe-money-gen] Maybe Amount
  123. 1033.59 s [really-safe-money-gen] fromDouble (QuantisationFactor qf) d
  124. 1033.59 s [really-safe-money-gen] - | d < 0 = Nothing
  125. 1033.59 s [really-safe-money-gen] + | d < 1 = Nothing
  126. 1033.59 s [really-safe-money-gen] | otherwise =
  127. 1033.59 s [really-safe-money-gen] let resultDouble :: Double
  128. 1033.59 s [really-safe-money-gen] resultDouble = d * (fromIntegral :: Word32 -> Double) qf
  129. 1033.59 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Amount.hs:668:17-30
  130. 1033.59 s [really-safe-money-gen] @@ -665,10 +665,9 @@
  131. 1033.59 s [really-safe-money-gen] theoreticalResult :: Ratio Natural
  132. 1033.59 s [really-safe-money-gen] theoreticalResult = amountAsRatio * f
  133. 1033.59 s [really-safe-money-gen] rounder :: Ratio Natural -> Natural
  134. 1033.59 s [really-safe-money-gen] rounder = case r of
  135. 1033.59 s [really-safe-money-gen] - RoundUp -> ceiling
  136. 1033.59 s [really-safe-money-gen] RoundDown -> floor
  137. 1033.59 s [really-safe-money-gen] RoundNearest -> round
  138. 1033.59 s [really-safe-money-gen] roundedResult :: Natural
  139. 1033.59 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  140. 1033.59 s [really-safe-money-gen] actualRate :: Ratio Natural
  141. 1033.59 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:399:18-83
  142. 1033.59 s [really-safe-money-gen] @@ -396,7 +396,7 @@
  143. 1033.59 s [really-safe-money-gen] floored = (floor :: Rational -> Natural) resultRational
  144. 1033.59 s [really-safe-money-gen] in if ceiled == floored
  145. 1033.59 s [really-safe-money-gen] then
  146. 1033.59 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  147. 1033.59 s [really-safe-money-gen] + if False
  148. 1033.59 s [really-safe-money-gen] then Nothing
  149. 1033.59 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  150. 1033.59 s [really-safe-money-gen] else Nothing
  151. 1038.87 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Amount.hs:668:17-30
  152. 1038.87 s [really-safe-money-gen] @@ -665,10 +665,9 @@
  153. 1038.90 s [really-safe-money-gen] theoreticalResult :: Ratio Natural
  154. 1038.90 s [really-safe-money-gen] theoreticalResult = amountAsRatio * f
  155. 1038.90 s [really-safe-money-gen] rounder :: Ratio Natural -> Natural
  156. 1038.90 s [really-safe-money-gen] rounder = case r of
  157. 1038.90 s [really-safe-money-gen] RoundUp -> ceiling
  158. 1038.90 s [really-safe-money-gen] RoundDown -> floor
  159. 1038.90 s [really-safe-money-gen] - RoundNearest -> round
  160. 1038.90 s [really-safe-money-gen] roundedResult :: Natural
  161. 1038.90 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  162. 1038.90 s [really-safe-money-gen] actualRate :: Ratio Natural
  163. 1038.90 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Amount.hs:668:17-30
  164. 1038.90 s [really-safe-money-gen] @@ -665,10 +665,9 @@
  165. 1038.90 s [really-safe-money-gen] theoreticalResult :: Ratio Natural
  166. 1038.90 s [really-safe-money-gen] theoreticalResult = amountAsRatio * f
  167. 1038.90 s [really-safe-money-gen] rounder :: Ratio Natural -> Natural
  168. 1038.90 s [really-safe-money-gen] rounder = case r of
  169. 1038.90 s [really-safe-money-gen] RoundUp -> ceiling
  170. 1038.90 s [really-safe-money-gen] - RoundDown -> floor
  171. 1038.90 s [really-safe-money-gen] RoundNearest -> round
  172. 1038.90 s [really-safe-money-gen] roundedResult :: Natural
  173. 1038.90 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  174. 1038.90 s [really-safe-money-gen] actualRate :: Ratio Natural
  175. 1038.90 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:399:18-83
  176. 1038.90 s [really-safe-money-gen] @@ -396,7 +396,7 @@
  177. 1038.90 s [really-safe-money-gen] floored = (floor :: Rational -> Natural) resultRational
  178. 1038.90 s [really-safe-money-gen] in if ceiled == floored
  179. 1038.90 s [really-safe-money-gen] then
  180. 1038.90 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  181. 1038.91 s [really-safe-money-gen] + if ceiled >= (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  182. 1038.91 s [really-safe-money-gen] then Nothing
  183. 1038.91 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  184. 1038.91 s [really-safe-money-gen] else Nothing
  185. 1038.91 s [really-safe-money-gen] Testing mutation IntLit at src/Money/Amount.hs:661:30-31
  186. 1038.91 s [really-safe-money-gen] @@ -658,7 +658,7 @@
  187. 1038.91 s [really-safe-money-gen] -- | The amount and the real rate that was used, considering the 'Rounding'
  188. 1038.91 s [really-safe-money-gen] (Maybe Amount, Ratio Natural)
  189. 1038.91 s [really-safe-money-gen] fraction _ (Amount 0) f = (Just zero, f)
  190. 1038.91 s [really-safe-money-gen] -fraction _ _ 0 = (Just zero, 0)
  191. 1038.91 s [really-safe-money-gen] +fraction _ _ 0 = (Just zero, 1)
  192. 1038.91 s [really-safe-money-gen] fraction r (Amount a) f =
  193. 1038.91 s [really-safe-money-gen] let amountAsRatio :: Ratio Natural
  194. 1038.91 s [really-safe-money-gen] amountAsRatio = (fromIntegral :: Word64 -> Ratio Natural) a
  195. 1038.91 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:666:27-44
  196. 1038.91 s [really-safe-money-gen] @@ -663,7 +663,7 @@
  197. 1038.91 s [really-safe-money-gen] let amountAsRatio :: Ratio Natural
  198. 1038.91 s [really-safe-money-gen] amountAsRatio = (fromIntegral :: Word64 -> Ratio Natural) a
  199. 1038.91 s [really-safe-money-gen] theoreticalResult :: Ratio Natural
  200. 1038.91 s [really-safe-money-gen] - theoreticalResult = amountAsRatio * f
  201. 1038.91 s [really-safe-money-gen] + theoreticalResult = amountAsRatio + f
  202. 1038.91 s [really-safe-money-gen] rounder :: Ratio Natural -> Natural
  203. 1038.91 s [really-safe-money-gen] rounder = case r of
  204. 1038.91 s [really-safe-money-gen] RoundUp -> ceiling
  205. 1038.91 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:666:27-44
  206. 1038.91 s [really-safe-money-gen] @@ -663,7 +663,7 @@
  207. 1038.91 s [really-safe-money-gen] let amountAsRatio :: Ratio Natural
  208. 1038.91 s [really-safe-money-gen] amountAsRatio = (fromIntegral :: Word64 -> Ratio Natural) a
  209. 1038.91 s [really-safe-money-gen] theoreticalResult :: Ratio Natural
  210. 1038.91 s [really-safe-money-gen] - theoreticalResult = amountAsRatio * f
  211. 1038.91 s [really-safe-money-gen] + theoreticalResult = amountAsRatio - f
  212. 1038.91 s [really-safe-money-gen] rounder :: Ratio Natural -> Natural
  213. 1038.91 s [really-safe-money-gen] rounder = case r of
  214. 1038.91 s [really-safe-money-gen] RoundUp -> ceiling
  215. 1038.91 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:681:12-37
  216. 1038.91 s [really-safe-money-gen] @@ -678,7 +678,7 @@
  217. 1038.91 s [really-safe-money-gen] maxBoundN :: Natural
  218. 1038.91 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  219. 1038.91 s [really-safe-money-gen] result = Amount ((fromIntegral :: Natural -> Word64) roundedResult)
  220. 1038.91 s [really-safe-money-gen] - in ( if roundedResult > maxBoundN
  221. 1038.91 s [really-safe-money-gen] + in ( if roundedResult < maxBoundN
  222. 1038.91 s [really-safe-money-gen] then Nothing
  223. 1038.92 s [really-safe-money-gen] else Just result,
  224. 1038.92 s [really-safe-money-gen] actualRate
  225. 1038.92 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:681:12-37
  226. 1038.92 s [really-safe-money-gen] @@ -678,7 +678,7 @@
  227. 1038.92 s [really-safe-money-gen] maxBoundN :: Natural
  228. 1038.92 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  229. 1038.92 s [really-safe-money-gen] result = Amount ((fromIntegral :: Natural -> Word64) roundedResult)
  230. 1038.92 s [really-safe-money-gen] - in ( if roundedResult > maxBoundN
  231. 1038.92 s [really-safe-money-gen] + in ( if roundedResult <= maxBoundN
  232. 1038.92 s [really-safe-money-gen] then Nothing
  233. 1038.92 s [really-safe-money-gen] else Just result,
  234. 1038.92 s [really-safe-money-gen] actualRate
  235. 1038.92 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:681:12-37
  236. 1038.92 s [really-safe-money-gen] @@ -678,7 +678,7 @@
  237. 1038.92 s [really-safe-money-gen] maxBoundN :: Natural
  238. 1038.92 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  239. 1038.92 s [really-safe-money-gen] result = Amount ((fromIntegral :: Natural -> Word64) roundedResult)
  240. 1038.92 s [really-safe-money-gen] - in ( if roundedResult > maxBoundN
  241. 1038.92 s [really-safe-money-gen] + in ( if roundedResult >= maxBoundN
  242. 1038.92 s [really-safe-money-gen] then Nothing
  243. 1038.92 s [really-safe-money-gen] else Just result,
  244. 1038.92 s [really-safe-money-gen] actualRate
  245. 1038.92 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:681:12-37
  246. 1038.92 s [really-safe-money-gen] @@ -678,7 +678,7 @@
  247. 1038.92 s [really-safe-money-gen] maxBoundN :: Natural
  248. 1038.92 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  249. 1038.92 s [really-safe-money-gen] result = Amount ((fromIntegral :: Natural -> Word64) roundedResult)
  250. 1038.92 s [really-safe-money-gen] - in ( if roundedResult > maxBoundN
  251. 1038.92 s [really-safe-money-gen] + in ( if True
  252. 1038.92 s [really-safe-money-gen] then Nothing
  253. 1038.92 s [really-safe-money-gen] else Just result,
  254. 1038.92 s [really-safe-money-gen] actualRate
  255. 1038.92 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:681:12-37
  256. 1038.92 s [really-safe-money-gen] @@ -678,7 +678,7 @@
  257. 1038.92 s [really-safe-money-gen] maxBoundN :: Natural
  258. 1038.92 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  259. 1038.92 s [really-safe-money-gen] result = Amount ((fromIntegral :: Natural -> Word64) roundedResult)
  260. 1038.92 s [really-safe-money-gen] - in ( if roundedResult > maxBoundN
  261. 1038.92 s [really-safe-money-gen] + in ( if False
  262. 1038.92 s [really-safe-money-gen] then Nothing
  263. 1038.92 s [really-safe-money-gen] else Just result,
  264. 1038.92 s [really-safe-money-gen] actualRate
  265. 1038.92 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/Amount.hs:661:19-28
  266. 1038.92 s [really-safe-money-gen] @@ -658,7 +658,7 @@
  267. 1038.92 s [really-safe-money-gen] -- | The amount and the real rate that was used, considering the 'Rounding'
  268. 1038.92 s [really-safe-money-gen] (Maybe Amount, Ratio Natural)
  269. 1038.92 s [really-safe-money-gen] fraction _ (Amount 0) f = (Just zero, f)
  270. 1038.92 s [really-safe-money-gen] -fraction _ _ 0 = (Just zero, 0)
  271. 1038.92 s [really-safe-money-gen] +fraction _ _ 0 = (Nothing, 0)
  272. 1038.92 s [really-safe-money-gen] fraction r (Amount a) f =
  273. 1038.92 s [really-safe-money-gen] let amountAsRatio :: Ratio Natural
  274. 1038.92 s [really-safe-money-gen] amountAsRatio = (fromIntegral :: Word64 -> Ratio Natural) a
  275. 1038.92 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:762:40-49
  276. 1038.92 s [really-safe-money-gen] @@ -759,7 +759,7 @@
  277. 1038.92 s [really-safe-money-gen] let qf1r = Prelude.fromIntegral (QuantisationFactor.unQuantisationFactor qf1)
  278. 1038.92 s [really-safe-money-gen] qf2r = Prelude.fromIntegral (QuantisationFactor.unQuantisationFactor qf2)
  279. 1038.92 s [really-safe-money-gen] (ma, ar) = fraction rounding a (ConversionRate.conversionFactor qf1 cr qf2)
  280. 1038.92 s [really-safe-money-gen] - in (ma, ConversionRate.fromRatio (ar * qf1r / qf2r))
  281. 1038.92 s [really-safe-money-gen] + in (ma, ConversionRate.fromRatio (ar - qf1r / qf2r))
  282. 1038.92 s [really-safe-money-gen]
  283. 1038.92 s [really-safe-money-gen] -- | Format an amount of money without a symbol.
  284. 1038.92 s [really-safe-money-gen] --
  285. 1038.92 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/Amount.hs:683:16-27
  286. 1038.92 s [really-safe-money-gen] @@ -680,7 +680,7 @@
  287. 1038.92 s [really-safe-money-gen] result = Amount ((fromIntegral :: Natural -> Word64) roundedResult)
  288. 1038.92 s [really-safe-money-gen] in ( if roundedResult > maxBoundN
  289. 1038.92 s [really-safe-money-gen] then Nothing
  290. 1038.92 s [really-safe-money-gen] - else Just result,
  291. 1038.92 s [really-safe-money-gen] + else Nothing,
  292. 1038.93 s [really-safe-money-gen] actualRate
  293. 1038.93 s [really-safe-money-gen] )
  294. 1038.93 s [really-safe-money-gen]
  295. 1038.93 s [really-safe-money-gen] Testing mutation Negate at src/Money/Amount.hs:681:12-37
  296. 1038.93 s [really-safe-money-gen] @@ -678,7 +678,7 @@
  297. 1038.93 s [really-safe-money-gen] maxBoundN :: Natural
  298. 1038.93 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  299. 1038.93 s [really-safe-money-gen] result = Amount ((fromIntegral :: Natural -> Word64) roundedResult)
  300. 1038.93 s [really-safe-money-gen] - in ( if roundedResult > maxBoundN
  301. 1038.93 s [really-safe-money-gen] + in ( if not (roundedResult > maxBoundN)
  302. 1038.93 s [really-safe-money-gen] then Nothing
  303. 1038.93 s [really-safe-money-gen] else Just result,
  304. 1038.93 s [really-safe-money-gen] actualRate
  305. 1038.93 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:341:26-91
  306. 1038.93 s [really-safe-money-gen] @@ -338,7 +338,7 @@
  307. 1038.93 s [really-safe-money-gen] floored = (floor :: Double -> Natural) resultDouble
  308. 1038.93 s [really-safe-money-gen] in if ceiled == floored
  309. 1038.93 s [really-safe-money-gen] then
  310. 1038.93 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  311. 1038.93 s [really-safe-money-gen] + if ceiled >= (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  312. 1038.93 s [really-safe-money-gen] then Nothing
  313. 1038.93 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  314. 1038.93 s [really-safe-money-gen] else Nothing
  315. 1038.93 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:762:40-49
  316. 1038.93 s [really-safe-money-gen] @@ -759,7 +759,7 @@
  317. 1044.02 s [really-safe-money-gen] let qf1r = Prelude.fromIntegral (QuantisationFactor.unQuantisationFactor qf1)
  318. 1044.05 s [really-safe-money-gen] qf2r = Prelude.fromIntegral (QuantisationFactor.unQuantisationFactor qf2)
  319. 1044.05 s [really-safe-money-gen] (ma, ar) = fraction rounding a (ConversionRate.conversionFactor qf1 cr qf2)
  320. 1044.05 s [really-safe-money-gen] - in (ma, ConversionRate.fromRatio (ar * qf1r / qf2r))
  321. 1044.05 s [really-safe-money-gen] + in (ma, ConversionRate.fromRatio (ar + qf1r / qf2r))
  322. 1044.05 s [really-safe-money-gen]
  323. 1044.05 s [really-safe-money-gen] -- | Format an amount of money without a symbol.
  324. 1044.05 s [really-safe-money-gen] --
  325. 1044.05 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:806:79-92
  326. 1044.05 s [really-safe-money-gen] @@ -803,4 +803,4 @@
  327. 1044.05 s [really-safe-money-gen]
  328. 1044.05 s [really-safe-money-gen] -- | Validate that an 'Amount' is strictly positive. I.e. not 'zero'.
  329. 1044.05 s [really-safe-money-gen] validateStrictlyPositive :: Amount -> Validation
  330. 1044.05 s [really-safe-money-gen] -validateStrictlyPositive amount = declare "The Amount is strictly positive" $ amount > zero
  331. 1044.05 s [really-safe-money-gen] +validateStrictlyPositive amount = declare "The Amount is strictly positive" $ amount < zero
  332. 1044.05 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:806:79-92
  333. 1044.05 s [really-safe-money-gen] @@ -803,4 +803,4 @@
  334. 1044.05 s [really-safe-money-gen]
  335. 1044.05 s [really-safe-money-gen] -- | Validate that an 'Amount' is strictly positive. I.e. not 'zero'.
  336. 1044.05 s [really-safe-money-gen] validateStrictlyPositive :: Amount -> Validation
  337. 1044.05 s [really-safe-money-gen] -validateStrictlyPositive amount = declare "The Amount is strictly positive" $ amount > zero
  338. 1044.05 s [really-safe-money-gen] +validateStrictlyPositive amount = declare "The Amount is strictly positive" $ amount >= zero
  339. 1044.05 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/Amount.hs:497:14-66
  340. 1044.05 s [really-safe-money-gen] @@ -494,7 +494,7 @@
  341. 1044.05 s [really-safe-money-gen] r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  342. 1044.05 s [really-safe-money-gen] in if r > maxBoundI
  343. 1044.05 s [really-safe-money-gen] then Nothing
  344. 1044.05 s [really-safe-money-gen] - else Just (Amount ((fromInteger :: Integer -> Word64) r))
  345. 1044.06 s [really-safe-money-gen] + else Nothing
  346. 1044.06 s [really-safe-money-gen]
  347. 1044.06 s [really-safe-money-gen] -- | Add two amounts of money.
  348. 1044.06 s [really-safe-money-gen] --
  349. 1044.06 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/Amount.hs:660:28-37
  350. 1044.06 s [really-safe-money-gen] @@ -657,7 +657,7 @@
  351. 1044.06 s [really-safe-money-gen] Ratio Natural ->
  352. 1044.06 s [really-safe-money-gen] -- | The amount and the real rate that was used, considering the 'Rounding'
  353. 1044.06 s [really-safe-money-gen] (Maybe Amount, Ratio Natural)
  354. 1044.06 s [really-safe-money-gen] -fraction _ (Amount 0) f = (Just zero, f)
  355. 1044.06 s [really-safe-money-gen] +fraction _ (Amount 0) f = (Nothing, f)
  356. 1044.06 s [really-safe-money-gen] fraction _ _ 0 = (Just zero, 0)
  357. 1044.06 s [really-safe-money-gen] fraction r (Amount a) f =
  358. 1044.06 s [really-safe-money-gen] let amountAsRatio :: Ratio Natural
  359. 1044.06 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:495:10-23
  360. 1044.06 s [really-safe-money-gen] @@ -492,7 +492,7 @@
  361. 1044.06 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  362. 1044.06 s [really-safe-money-gen] r :: Integer
  363. 1044.06 s [really-safe-money-gen] r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  364. 1044.06 s [really-safe-money-gen] - in if r > maxBoundI
  365. 1044.06 s [really-safe-money-gen] + in if False
  366. 1044.06 s [really-safe-money-gen] then Nothing
  367. 1044.06 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  368. 1044.06 s [really-safe-money-gen]
  369. 1044.06 s [really-safe-money-gen] Testing mutation Negate at src/Money/Amount.hs:495:10-23
  370. 1044.06 s [really-safe-money-gen] @@ -492,7 +492,7 @@
  371. 1044.06 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  372. 1044.06 s [really-safe-money-gen] r :: Integer
  373. 1044.06 s [really-safe-money-gen] r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  374. 1044.06 s [really-safe-money-gen] - in if r > maxBoundI
  375. 1044.06 s [really-safe-money-gen] + in if not (r > maxBoundI)
  376. 1044.06 s [really-safe-money-gen] then Nothing
  377. 1044.06 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  378. 1044.06 s [really-safe-money-gen]
  379. 1044.06 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:607:15-22
  380. 1044.06 s [really-safe-money-gen] @@ -604,7 +604,7 @@
  381. 1044.06 s [really-safe-money-gen] case ad of
  382. 1044.06 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  383. 1044.06 s [really-safe-money-gen] declare "The larger chunks are larger" $
  384. 1044.06 s [really-safe-money-gen] - a1 > a2
  385. 1044.06 s [really-safe-money-gen] + True
  386. 1044.07 s [really-safe-money-gen] _ -> valid
  387. 1044.07 s [really-safe-money-gen] ]
  388. 1044.07 s [really-safe-money-gen]
  389. 1044.07 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:607:15-22
  390. 1044.07 s [really-safe-money-gen] @@ -604,7 +604,7 @@
  391. 1044.07 s [really-safe-money-gen] case ad of
  392. 1044.07 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  393. 1044.07 s [really-safe-money-gen] declare "The larger chunks are larger" $
  394. 1044.07 s [really-safe-money-gen] - a1 > a2
  395. 1044.07 s [really-safe-money-gen] + False
  396. 1044.07 s [really-safe-money-gen] _ -> valid
  397. 1044.07 s [really-safe-money-gen] ]
  398. 1044.07 s [really-safe-money-gen]
  399. 1044.07 s [really-safe-money-gen] Testing mutation Negate at src/Money/Amount.hs:607:15-22
  400. 1044.07 s [really-safe-money-gen] @@ -604,7 +604,7 @@
  401. 1044.07 s [really-safe-money-gen] case ad of
  402. 1044.07 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  403. 1044.07 s [really-safe-money-gen] declare "The larger chunks are larger" $
  404. 1044.07 s [really-safe-money-gen] - a1 > a2
  405. 1044.07 s [really-safe-money-gen] + not (a1 > a2)
  406. 1044.07 s [really-safe-money-gen] _ -> valid
  407. 1044.07 s [really-safe-money-gen] ]
  408. 1044.07 s [really-safe-money-gen]
  409. 1044.07 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:607:15-22
  410. 1044.07 s [really-safe-money-gen] @@ -604,7 +604,7 @@
  411. 1044.07 s [really-safe-money-gen] case ad of
  412. 1044.07 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  413. 1044.07 s [really-safe-money-gen] declare "The larger chunks are larger" $
  414. 1044.07 s [really-safe-money-gen] - a1 > a2
  415. 1044.07 s [really-safe-money-gen] + a1 >= a2
  416. 1044.07 s [really-safe-money-gen] _ -> valid
  417. 1044.07 s [really-safe-money-gen] ]
  418. 1044.07 s [really-safe-money-gen]
  419. 1044.07 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Amount.hs:604:9-21
  420. 1044.07 s [really-safe-money-gen] @@ -601,11 +601,8 @@
  421. 1044.07 s [really-safe-money-gen] validate ad =
  422. 1044.07 s [really-safe-money-gen] mconcat
  423. 1044.07 s [really-safe-money-gen] [ genericValidate ad,
  424. 1044.07 s [really-safe-money-gen] case ad of
  425. 1044.07 s [really-safe-money-gen] - DistributedIntoUnequalChunks _ a1 _ a2 ->
  426. 1044.07 s [really-safe-money-gen] - declare "The larger chunks are larger" $
  427. 1044.07 s [really-safe-money-gen] - a1 > a2
  428. 1044.07 s [really-safe-money-gen] _ -> valid
  429. 1044.07 s [really-safe-money-gen] ]
  430. 1044.07 s [really-safe-money-gen]
  431. 1044.07 s [really-safe-money-gen] instance (NFData amount) => NFData (Distribution amount)
  432. 1044.07 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Amount.hs:604:9-21
  433. 1044.07 s [really-safe-money-gen] @@ -601,11 +601,10 @@
  434. 1044.07 s [really-safe-money-gen] validate ad =
  435. 1044.08 s [really-safe-money-gen] mconcat
  436. 1044.08 s [really-safe-money-gen] [ genericValidate ad,
  437. 1044.08 s [really-safe-money-gen] case ad of
  438. 1044.08 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  439. 1044.08 s [really-safe-money-gen] declare "The larger chunks are larger" $
  440. 1044.08 s [really-safe-money-gen] a1 > a2
  441. 1044.08 s [really-safe-money-gen] - _ -> valid
  442. 1044.08 s [really-safe-money-gen] ]
  443. 1044.08 s [really-safe-money-gen]
  444. 1044.08 s [really-safe-money-gen] instance (NFData amount) => NFData (Distribution amount)
  445. 1044.08 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Amount.hs:603:7-8
  446. 1044.08 s [really-safe-money-gen] @@ -600,13 +600,7 @@
  447. 1044.08 s [really-safe-money-gen] instance (Validity amount, Ord amount) => Validity (Distribution amount) where
  448. 1044.08 s [really-safe-money-gen] validate ad =
  449. 1044.08 s [really-safe-money-gen] mconcat
  450. 1044.08 s [really-safe-money-gen] - [ genericValidate ad,
  451. 1044.08 s [really-safe-money-gen] - case ad of
  452. 1044.08 s [really-safe-money-gen] - DistributedIntoUnequalChunks _ a1 _ a2 ->
  453. 1044.08 s [really-safe-money-gen] - declare "The larger chunks are larger" $
  454. 1044.08 s [really-safe-money-gen] - a1 > a2
  455. 1044.08 s [really-safe-money-gen] - _ -> valid
  456. 1044.08 s [really-safe-money-gen] ]
  457. 1044.08 s [really-safe-money-gen]
  458. 1044.08 s [really-safe-money-gen] instance (NFData amount) => NFData (Distribution amount)
  459. 1044.08 s [really-safe-money-gen]
  460. 1044.08 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Amount.hs:603:7-8
  461. 1044.08 s [really-safe-money-gen] @@ -600,13 +600,12 @@
  462. 1044.08 s [really-safe-money-gen] instance (Validity amount, Ord amount) => Validity (Distribution amount) where
  463. 1044.08 s [really-safe-money-gen] validate ad =
  464. 1044.08 s [really-safe-money-gen] mconcat
  465. 1044.08 s [really-safe-money-gen] - [ genericValidate ad,
  466. 1044.08 s [really-safe-money-gen] case ad of
  467. 1044.08 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  468. 1044.08 s [really-safe-money-gen] declare "The larger chunks are larger" $
  469. 1044.08 s [really-safe-money-gen] a1 > a2
  470. 1044.08 s [really-safe-money-gen] _ -> valid
  471. 1044.08 s [really-safe-money-gen] ]
  472. 1044.08 s [really-safe-money-gen]
  473. 1044.08 s [really-safe-money-gen] instance (NFData amount) => NFData (Distribution amount)
  474. 1044.08 s [really-safe-money-gen]
  475. 1044.08 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:607:15-22
  476. 1044.08 s [really-safe-money-gen] @@ -604,7 +604,7 @@
  477. 1044.08 s [really-safe-money-gen] case ad of
  478. 1044.08 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  479. 1044.08 s [really-safe-money-gen] declare "The larger chunks are larger" $
  480. 1044.08 s [really-safe-money-gen] - a1 > a2
  481. 1044.08 s [really-safe-money-gen] + a1 <= a2
  482. 1044.08 s [really-safe-money-gen] _ -> valid
  483. 1044.08 s [really-safe-money-gen] ]
  484. 1044.08 s [really-safe-money-gen]
  485. 1044.08 s [really-safe-money-gen] Testing mutation Negate at src/Money/Amount.hs:806:79-92
  486. 1044.08 s [really-safe-money-gen] @@ -803,4 +803,4 @@
  487. 1044.08 s [really-safe-money-gen]
  488. 1044.08 s [really-safe-money-gen] -- | Validate that an 'Amount' is strictly positive. I.e. not 'zero'.
  489. 1044.08 s [really-safe-money-gen] validateStrictlyPositive :: Amount -> Validation
  490. 1044.08 s [really-safe-money-gen] -validateStrictlyPositive amount = declare "The Amount is strictly positive" $ amount > zero
  491. 1044.08 s [really-safe-money-gen] +validateStrictlyPositive amount = declare "The Amount is strictly positive" $ not (amount > zero)
  492. 1044.08 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:806:79-92
  493. 1044.08 s [really-safe-money-gen] @@ -803,4 +803,4 @@
  494. 1044.08 s [really-safe-money-gen]
  495. 1044.09 s [really-safe-money-gen] -- | Validate that an 'Amount' is strictly positive. I.e. not 'zero'.
  496. 1044.09 s [really-safe-money-gen] validateStrictlyPositive :: Amount -> Validation
  497. 1044.09 s [really-safe-money-gen] -validateStrictlyPositive amount = declare "The Amount is strictly positive" $ amount > zero
  498. 1048.71 s [really-safe-money-gen] +validateStrictlyPositive amount = declare "The Amount is strictly positive" $ True
  499. 1048.71 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount.hs:806:79-92
  500. 1048.71 s [really-safe-money-gen] @@ -803,4 +803,4 @@
  501. 1048.71 s [really-safe-money-gen]
  502. 1048.71 s [really-safe-money-gen] -- | Validate that an 'Amount' is strictly positive. I.e. not 'zero'.
  503. 1048.71 s [really-safe-money-gen] validateStrictlyPositive :: Amount -> Validation
  504. 1048.71 s [really-safe-money-gen] -validateStrictlyPositive amount = declare "The Amount is strictly positive" $ amount > zero
  505. 1048.71 s [really-safe-money-gen] +validateStrictlyPositive amount = declare "The Amount is strictly positive" $ False
  506. 1048.71 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:543:11-88
  507. 1048.71 s [really-safe-money-gen] @@ -540,7 +540,7 @@
  508. 1048.71 s [really-safe-money-gen] let maxBoundI :: Integer
  509. 1048.71 s [really-safe-money-gen] maxBoundI = (fromIntegral :: Word64 -> Integer) (maxBound :: Word64)
  510. 1048.71 s [really-safe-money-gen] r :: Integer
  511. 1048.71 s [really-safe-money-gen] - r = (fromIntegral :: Word32 -> Integer) f * (fromIntegral :: Word64 -> Integer) a
  512. 1048.71 s [really-safe-money-gen] + r = (fromIntegral :: Word32 -> Integer) f + (fromIntegral :: Word64 -> Integer) a
  513. 1048.71 s [really-safe-money-gen] in if r > maxBoundI
  514. 1048.71 s [really-safe-money-gen] then Nothing
  515. 1048.71 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  516. 1048.71 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:399:18-83
  517. 1048.71 s [really-safe-money-gen] @@ -396,7 +396,7 @@
  518. 1048.71 s [really-safe-money-gen] floored = (floor :: Rational -> Natural) resultRational
  519. 1048.71 s [really-safe-money-gen] in if ceiled == floored
  520. 1048.71 s [really-safe-money-gen] then
  521. 1048.71 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  522. 1048.71 s [really-safe-money-gen] + if ceiled <= (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  523. 1048.71 s [really-safe-money-gen] then Nothing
  524. 1048.71 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  525. 1048.71 s [really-safe-money-gen] else Nothing
  526. 1048.71 s [really-safe-money-gen] Testing mutation Cmp at src/Money/MultiAmount.hs:168:20-45
  527. 1048.71 s [really-safe-money-gen] @@ -165,7 +165,7 @@
  528. 1048.71 s [really-safe-money-gen] maxBoundN :: Natural
  529. 1048.71 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  530. 1048.71 s [really-safe-money-gen] actualResult =
  531. 1048.71 s [really-safe-money-gen] - if roundedResult > maxBoundN
  532. 1048.72 s [really-safe-money-gen] + if roundedResult < maxBoundN
  533. 1048.72 s [really-safe-money-gen] then Nothing
  534. 1048.72 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  535. 1048.72 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  536. 1048.72 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:323:26-67
  537. 1048.72 s [really-safe-money-gen] @@ -320,7 +320,7 @@
  538. 1048.72 s [really-safe-money-gen] | d < 0 = Nothing
  539. 1048.72 s [really-safe-money-gen] | otherwise =
  540. 1048.72 s [really-safe-money-gen] let resultDouble :: Double
  541. 1048.72 s [really-safe-money-gen] - resultDouble = d * (fromIntegral :: Word32 -> Double) qf
  542. 1048.72 s [really-safe-money-gen] + resultDouble = d - (fromIntegral :: Word32 -> Double) qf
  543. 1048.72 s [really-safe-money-gen] in go resultDouble
  544. 1048.72 s [really-safe-money-gen] where
  545. 1048.72 s [really-safe-money-gen] go resultDouble
  546. 1048.72 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:577:39-63
  547. 1048.72 s [really-safe-money-gen] @@ -574,7 +574,7 @@
  548. 1048.72 s [really-safe-money-gen] numberOfLargerChunks :: Word32
  549. 1048.72 s [really-safe-money-gen] numberOfLargerChunks = (fromIntegral :: Word64 -> Word32) rest
  550. 1048.72 s [really-safe-money-gen] numberOfSmallerChunks :: Word32
  551. 1048.72 s [really-safe-money-gen] - numberOfSmallerChunks = f - numberOfLargerChunks
  552. 1048.72 s [really-safe-money-gen] + numberOfSmallerChunks = f + numberOfLargerChunks
  553. 1048.72 s [really-safe-money-gen] largerChunk :: Amount
  554. 1048.72 s [really-safe-money-gen] largerChunk = Amount $ succ smallerChunkSize
  555. 1048.72 s [really-safe-money-gen] in DistributedIntoUnequalChunks
  556. 1048.72 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:159:25-38
  557. 1048.72 s [really-safe-money-gen] @@ -156,10 +156,9 @@
  558. 1048.72 s [really-safe-money-gen] fmap
  559. 1048.72 s [really-safe-money-gen] ( ( \theoreticalResult ->
  560. 1048.72 s [really-safe-money-gen] let rounder :: Ratio Natural -> Natural
  561. 1048.72 s [really-safe-money-gen] rounder = case r of
  562. 1048.72 s [really-safe-money-gen] RoundUp -> ceiling
  563. 1048.72 s [really-safe-money-gen] - RoundDown -> floor
  564. 1048.72 s [really-safe-money-gen] RoundNearest -> round
  565. 1048.72 s [really-safe-money-gen] roundedResult :: Natural
  566. 1048.72 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  567. 1048.73 s [really-safe-money-gen] maxBoundN :: Natural
  568. 1048.73 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:159:25-38
  569. 1048.73 s [really-safe-money-gen] @@ -156,10 +156,9 @@
  570. 1048.73 s [really-safe-money-gen] fmap
  571. 1048.73 s [really-safe-money-gen] ( ( \theoreticalResult ->
  572. 1048.73 s [really-safe-money-gen] let rounder :: Ratio Natural -> Natural
  573. 1048.73 s [really-safe-money-gen] rounder = case r of
  574. 1048.73 s [really-safe-money-gen] RoundUp -> ceiling
  575. 1048.73 s [really-safe-money-gen] RoundDown -> floor
  576. 1048.73 s [really-safe-money-gen] - RoundNearest -> round
  577. 1048.73 s [really-safe-money-gen] roundedResult :: Natural
  578. 1048.73 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  579. 1048.73 s [really-safe-money-gen] maxBoundN :: Natural
  580. 1048.73 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:806:79-92
  581. 1048.73 s [really-safe-money-gen] @@ -803,4 +803,4 @@
  582. 1048.73 s [really-safe-money-gen]
  583. 1048.73 s [really-safe-money-gen] -- | Validate that an 'Amount' is strictly positive. I.e. not 'zero'.
  584. 1048.73 s [really-safe-money-gen] validateStrictlyPositive :: Amount -> Validation
  585. 1048.73 s [really-safe-money-gen] -validateStrictlyPositive amount = declare "The Amount is strictly positive" $ amount > zero
  586. 1048.73 s [really-safe-money-gen] +validateStrictlyPositive amount = declare "The Amount is strictly positive" $ amount <= zero
  587. 1048.73 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:159:25-38
  588. 1048.73 s [really-safe-money-gen] @@ -156,10 +156,9 @@
  589. 1048.73 s [really-safe-money-gen] fmap
  590. 1048.73 s [really-safe-money-gen] ( ( \theoreticalResult ->
  591. 1048.73 s [really-safe-money-gen] let rounder :: Ratio Natural -> Natural
  592. 1048.73 s [really-safe-money-gen] rounder = case r of
  593. 1048.73 s [really-safe-money-gen] - RoundUp -> ceiling
  594. 1048.73 s [really-safe-money-gen] RoundDown -> floor
  595. 1048.73 s [really-safe-money-gen] RoundNearest -> round
  596. 1048.73 s [really-safe-money-gen] roundedResult :: Natural
  597. 1048.73 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  598. 1048.73 s [really-safe-money-gen] maxBoundN :: Natural
  599. 1048.73 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:168:20-45
  600. 1048.73 s [really-safe-money-gen] @@ -165,7 +165,7 @@
  601. 1048.73 s [really-safe-money-gen] maxBoundN :: Natural
  602. 1048.73 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  603. 1048.73 s [really-safe-money-gen] actualResult =
  604. 1048.73 s [really-safe-money-gen] - if roundedResult > maxBoundN
  605. 1048.73 s [really-safe-money-gen] + if True
  606. 1048.73 s [really-safe-money-gen] then Nothing
  607. 1048.73 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  608. 1048.73 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  609. 1048.73 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:607:15-22
  610. 1048.73 s [really-safe-money-gen] @@ -604,7 +604,7 @@
  611. 1048.73 s [really-safe-money-gen] case ad of
  612. 1048.73 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  613. 1048.73 s [really-safe-money-gen] declare "The larger chunks are larger" $
  614. 1048.74 s [really-safe-money-gen] - a1 > a2
  615. 1048.74 s [really-safe-money-gen] + a1 < a2
  616. 1048.74 s [really-safe-money-gen] _ -> valid
  617. 1048.74 s [really-safe-money-gen] ]
  618. 1048.74 s [really-safe-money-gen]
  619. 1048.74 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/MultiAmount.hs:170:24-57
  620. 1048.74 s [really-safe-money-gen] @@ -167,7 +167,7 @@
  621. 1048.74 s [really-safe-money-gen] actualResult =
  622. 1048.74 s [really-safe-money-gen] if roundedResult > maxBoundN
  623. 1048.74 s [really-safe-money-gen] then Nothing
  624. 1048.74 s [really-safe-money-gen] - else Just (fromIntegral roundedResult)
  625. 1048.74 s [really-safe-money-gen] + else Nothing
  626. 1048.74 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  627. 1048.74 s [really-safe-money-gen] LT -> RoundedDown
  628. 1048.74 s [really-safe-money-gen] EQ -> DidNotRound
  629. 1048.74 s [really-safe-money-gen] Testing mutation Cmp at src/Money/MultiAmount.hs:168:20-45
  630. 1048.74 s [really-safe-money-gen] @@ -165,7 +165,7 @@
  631. 1048.74 s [really-safe-money-gen] maxBoundN :: Natural
  632. 1048.74 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  633. 1048.74 s [really-safe-money-gen] actualResult =
  634. 1048.74 s [really-safe-money-gen] - if roundedResult > maxBoundN
  635. 1048.74 s [really-safe-money-gen] + if roundedResult >= maxBoundN
  636. 1048.74 s [really-safe-money-gen] then Nothing
  637. 1048.74 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  638. 1048.74 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  639. 1048.74 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:171:25-32
  640. 1048.74 s [really-safe-money-gen] @@ -168,10 +168,9 @@
  641. 1048.74 s [really-safe-money-gen] if roundedResult > maxBoundN
  642. 1048.74 s [really-safe-money-gen] then Nothing
  643. 1048.74 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  644. 1048.74 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  645. 1048.74 s [really-safe-money-gen] LT -> RoundedDown
  646. 1048.74 s [really-safe-money-gen] - EQ -> DidNotRound
  647. 1048.74 s [really-safe-money-gen] GT -> RoundedUp
  648. 1048.74 s [really-safe-money-gen] in (Amount.fromMinimalQuantisations <$> actualResult, rounded)
  649. 1048.74 s [really-safe-money-gen] )
  650. 1048.74 s [really-safe-money-gen] . Prelude.sum
  651. 1048.74 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:171:25-32
  652. 1048.75 s [really-safe-money-gen] @@ -168,10 +168,9 @@
  653. 1048.75 s [really-safe-money-gen] if roundedResult > maxBoundN
  654. 1048.75 s [really-safe-money-gen] then Nothing
  655. 1048.75 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  656. 1048.75 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  657. 1053.20 s [really-safe-money-gen] LT -> RoundedDown
  658. 1053.20 s [really-safe-money-gen] EQ -> DidNotRound
  659. 1053.20 s [really-safe-money-gen] - GT -> RoundedUp
  660. 1053.27 s [really-safe-money-gen] in (Amount.fromMinimalQuantisations <$> actualResult, rounded)
  661. 1053.27 s [really-safe-money-gen] )
  662. 1053.27 s [really-safe-money-gen] . Prelude.sum
  663. 1053.27 s [really-safe-money-gen] Testing mutation Cmp at src/Money/MultiAmount.hs:168:20-45
  664. 1053.27 s [really-safe-money-gen] @@ -165,7 +165,7 @@
  665. 1053.27 s [really-safe-money-gen] maxBoundN :: Natural
  666. 1053.28 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  667. 1053.28 s [really-safe-money-gen] actualResult =
  668. 1053.28 s [really-safe-money-gen] - if roundedResult > maxBoundN
  669. 1053.28 s [really-safe-money-gen] + if roundedResult <= maxBoundN
  670. 1053.28 s [really-safe-money-gen] then Nothing
  671. 1053.28 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  672. 1053.28 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  673. 1053.28 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:168:20-45
  674. 1053.28 s [really-safe-money-gen] @@ -165,7 +165,7 @@
  675. 1053.28 s [really-safe-money-gen] maxBoundN :: Natural
  676. 1053.28 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  677. 1053.28 s [really-safe-money-gen] actualResult =
  678. 1053.28 s [really-safe-money-gen] - if roundedResult > maxBoundN
  679. 1053.28 s [really-safe-money-gen] + if False
  680. 1053.28 s [really-safe-money-gen] then Nothing
  681. 1053.28 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  682. 1053.28 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  683. 1053.28 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:171:25-32
  684. 1053.28 s [really-safe-money-gen] @@ -168,10 +168,9 @@
  685. 1053.28 s [really-safe-money-gen] if roundedResult > maxBoundN
  686. 1053.28 s [really-safe-money-gen] then Nothing
  687. 1053.28 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  688. 1053.28 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  689. 1053.28 s [really-safe-money-gen] - LT -> RoundedDown
  690. 1053.28 s [really-safe-money-gen] EQ -> DidNotRound
  691. 1053.28 s [really-safe-money-gen] GT -> RoundedUp
  692. 1053.28 s [really-safe-money-gen] in (Amount.fromMinimalQuantisations <$> actualResult, rounded)
  693. 1053.28 s [really-safe-money-gen] )
  694. 1053.28 s [really-safe-money-gen] . Prelude.sum
  695. 1053.28 s [really-safe-money-gen] Testing mutation Arith at src/Money/MultiAmount.hs:182:15-106
  696. 1053.28 s [really-safe-money-gen] @@ -179,7 +179,7 @@
  697. 1053.28 s [really-safe-money-gen] . traverse
  698. 1053.28 s [really-safe-money-gen] ( \(currency, a) ->
  699. 1053.28 s [really-safe-money-gen] ( \(cr, qf2) ->
  700. 1053.28 s [really-safe-money-gen] - fromIntegral (Amount.toMinimalQuantisations a) * ConversionRate.conversionFactor qf2 cr qf1
  701. 1053.29 s [really-safe-money-gen] + fromIntegral (Amount.toMinimalQuantisations a) + ConversionRate.conversionFactor qf2 cr qf1
  702. 1053.29 s [really-safe-money-gen] )
  703. 1053.29 s [really-safe-money-gen] <$> func currency
  704. 1053.29 s [really-safe-money-gen] )
  705. 1053.29 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/MultiAmount.hs:112:33-39
  706. 1053.29 s [really-safe-money-gen] @@ -109,7 +109,7 @@
  707. 1053.29 s [really-safe-money-gen]
  708. 1053.29 s [really-safe-money-gen] -- | Subtract an 'Amount' from a 'MultiAmount'
  709. 1053.29 s [really-safe-money-gen] subtractAmount :: (Ord currency) => MultiAmount currency -> currency -> Amount -> Maybe (MultiAmount currency)
  710. 1053.29 s [really-safe-money-gen] -subtractAmount m _ (Amount 0) = Just m
  711. 1053.29 s [really-safe-money-gen] +subtractAmount m _ (Amount 0) = Nothing
  712. 1053.29 s [really-safe-money-gen] subtractAmount (MultiAmount m) currency amount =
  713. 1053.29 s [really-safe-money-gen] fmap MultiAmount $ case M.lookup currency m of
  714. 1053.29 s [really-safe-money-gen] Nothing -> Nothing -- Can't go below zero
  715. 1053.29 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:341:26-91
  716. 1053.29 s [really-safe-money-gen] @@ -338,7 +338,7 @@
  717. 1053.29 s [really-safe-money-gen] floored = (floor :: Double -> Natural) resultDouble
  718. 1053.29 s [really-safe-money-gen] in if ceiled == floored
  719. 1053.29 s [really-safe-money-gen] then
  720. 1053.29 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  721. 1053.29 s [really-safe-money-gen] + if ceiled <= (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  722. 1053.29 s [really-safe-money-gen] then Nothing
  723. 1053.29 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  724. 1053.29 s [really-safe-money-gen] else Nothing
  725. 1053.29 s [really-safe-money-gen] Testing mutation IntLit at src/Money/Amount.hs:494:96-97
  726. 1053.29 s [really-safe-money-gen] @@ -491,7 +491,7 @@
  727. 1053.29 s [really-safe-money-gen] let maxBoundI :: Integer
  728. 1053.29 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  729. 1053.29 s [really-safe-money-gen] r :: Integer
  730. 1053.29 s [really-safe-money-gen] - r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  731. 1053.29 s [really-safe-money-gen] + r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 1 l
  732. 1053.29 s [really-safe-money-gen] in if r > maxBoundI
  733. 1053.29 s [really-safe-money-gen] then Nothing
  734. 1053.29 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  735. 1053.29 s [really-safe-money-gen] Testing mutation Arith at src/Money/Amount.hs:494:29-94
  736. 1053.29 s [really-safe-money-gen] @@ -491,7 +491,7 @@
  737. 1053.29 s [really-safe-money-gen] let maxBoundI :: Integer
  738. 1053.29 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  739. 1053.29 s [really-safe-money-gen] r :: Integer
  740. 1053.29 s [really-safe-money-gen] - r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  741. 1053.29 s [really-safe-money-gen] + r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) * acc) 0 l
  742. 1053.29 s [really-safe-money-gen] in if r > maxBoundI
  743. 1053.29 s [really-safe-money-gen] then Nothing
  744. 1053.29 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  745. 1053.29 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount.hs:495:10-23
  746. 1053.30 s [really-safe-money-gen] @@ -492,7 +492,7 @@
  747. 1053.30 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  748. 1053.30 s [really-safe-money-gen] r :: Integer
  749. 1053.30 s [really-safe-money-gen] r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  750. 1053.30 s [really-safe-money-gen] - in if r > maxBoundI
  751. 1053.30 s [really-safe-money-gen] + in if r >= maxBoundI
  752. 1053.30 s [really-safe-money-gen] then Nothing
  753. 1053.30 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  754. 1053.30 s [really-safe-money-gen]
  755. 1053.30 s [really-safe-money-gen] Testing mutation IntLit at src/Money/Amount.hs:250:15-16
  756. 1053.30 s [really-safe-money-gen] @@ -247,7 +247,7 @@
  757. 1053.30 s [really-safe-money-gen] -- >>> zero
  758. 1053.30 s [really-safe-money-gen] -- Amount 0
  759. 1053.30 s [really-safe-money-gen] zero :: Amount
  760. 1053.30 s [really-safe-money-gen] -zero = Amount 0
  761. 1053.30 s [really-safe-money-gen] +zero = Amount 1
  762. 1053.30 s [really-safe-money-gen]
  763. 1053.30 s [really-safe-money-gen] -- | Turn an amount into a number of minimal quantisations.
  764. 1053.30 s [really-safe-money-gen] --
  765. 1053.30 s [really-safe-money-gen] Testing mutation Negate at src/Money/MultiAmount.hs:168:20-45
  766. 1053.30 s [really-safe-money-gen] @@ -165,7 +165,7 @@
  767. 1053.30 s [really-safe-money-gen] maxBoundN :: Natural
  768. 1053.30 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  769. 1053.30 s [really-safe-money-gen] actualResult =
  770. 1053.30 s [really-safe-money-gen] - if roundedResult > maxBoundN
  771. 1053.30 s [really-safe-money-gen] + if not (roundedResult > maxBoundN)
  772. 1053.30 s [really-safe-money-gen] then Nothing
  773. 1053.30 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  774. 1053.30 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  775. 1053.30 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:119:12-28
  776. 1053.30 s [really-safe-money-gen] @@ -116,7 +116,7 @@
  777. 1053.30 s [really-safe-money-gen] Just a -> do
  778. 1053.30 s [really-safe-money-gen] r <- Amount.subtract a amount
  779. 1053.30 s [really-safe-money-gen] Just $
  780. 1053.30 s [really-safe-money-gen] - if r == Amount.zero
  781. 1053.30 s [really-safe-money-gen] + if False
  782. 1053.30 s [really-safe-money-gen] then M.delete currency m
  783. 1053.30 s [really-safe-money-gen] else M.insert currency r m
  784. 1053.30 s [really-safe-money-gen]
  785. 1053.30 s [really-safe-money-gen] Testing mutation Negate at src/Money/MultiAmount.hs:119:12-28
  786. 1053.30 s [really-safe-money-gen] @@ -116,7 +116,7 @@
  787. 1053.30 s [really-safe-money-gen] Just a -> do
  788. 1053.30 s [really-safe-money-gen] r <- Amount.subtract a amount
  789. 1053.30 s [really-safe-money-gen] Just $
  790. 1053.30 s [really-safe-money-gen] - if r == Amount.zero
  791. 1053.30 s [really-safe-money-gen] + if not (r == Amount.zero)
  792. 1053.30 s [really-safe-money-gen] then M.delete currency m
  793. 1053.30 s [really-safe-money-gen] else M.insert currency r m
  794. 1053.30 s [really-safe-money-gen]
  795. 1053.30 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/MultiAmount.hs:99:28-34
  796. 1053.30 s [really-safe-money-gen] @@ -96,7 +96,7 @@
  797. 1053.30 s [really-safe-money-gen]
  798. 1053.30 s [really-safe-money-gen] -- | Add an 'Amount' to a 'MultiAmount'
  799. 1053.30 s [really-safe-money-gen] addAmount :: (Ord currency) => MultiAmount currency -> currency -> Amount -> Maybe (MultiAmount currency)
  800. 1053.30 s [really-safe-money-gen] -addAmount m _ (Amount 0) = Just m
  801. 1053.30 s [really-safe-money-gen] +addAmount m _ (Amount 0) = Nothing
  802. 1053.30 s [really-safe-money-gen] addAmount (MultiAmount m) currency amount =
  803. 1053.30 s [really-safe-money-gen] fmap MultiAmount $ case M.lookup currency m of
  804. 1053.31 s [really-safe-money-gen] Nothing -> Just $ M.insert currency amount m
  805. 1053.31 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:114:22-37
  806. 1053.31 s [really-safe-money-gen] @@ -111,14 +111,13 @@
  807. 1053.31 s [really-safe-money-gen] subtractAmount :: (Ord currency) => MultiAmount currency -> currency -> Amount -> Maybe (MultiAmount currency)
  808. 1053.31 s [really-safe-money-gen] subtractAmount m _ (Amount 0) = Just m
  809. 1053.31 s [really-safe-money-gen] subtractAmount (MultiAmount m) currency amount =
  810. 1053.31 s [really-safe-money-gen] fmap MultiAmount $ case M.lookup currency m of
  811. 1053.31 s [really-safe-money-gen] - Nothing -> Nothing -- Can't go below zero
  812. 1053.31 s [really-safe-money-gen] Just a -> do
  813. 1053.31 s [really-safe-money-gen] r <- Amount.subtract a amount
  814. 1053.31 s [really-safe-money-gen] Just $
  815. 1053.31 s [really-safe-money-gen] if r == Amount.zero
  816. 1053.31 s [really-safe-money-gen] then M.delete currency m
  817. 1053.31 s [really-safe-money-gen] else M.insert currency r m
  818. 1053.31 s [really-safe-money-gen]
  819. 1053.31 s [really-safe-money-gen] -- | Try to convert every amount to one currency.
  820. 1053.31 s [really-safe-money-gen] --
  821. 1053.31 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:114:22-37
  822. 1056.40 s [really-safe-money-gen] @@ -111,14 +111,8 @@
  823. 1056.40 s [really-safe-money-gen] subtractAmount :: (Ord currency) => MultiAmount currency -> currency -> Amount -> Maybe (MultiAmount currency)
  824. 1056.40 s [really-safe-money-gen] subtractAmount m _ (Amount 0) = Just m
  825. 1056.40 s [really-safe-money-gen] subtractAmount (MultiAmount m) currency amount =
  826. 1056.40 s [really-safe-money-gen] fmap MultiAmount $ case M.lookup currency m of
  827. 1056.40 s [really-safe-money-gen] Nothing -> Nothing -- Can't go below zero
  828. 1056.40 s [really-safe-money-gen] - Just a -> do
  829. 1056.40 s [really-safe-money-gen] - r <- Amount.subtract a amount
  830. 1056.40 s [really-safe-money-gen] - Just $
  831. 1056.40 s [really-safe-money-gen] - if r == Amount.zero
  832. 1056.40 s [really-safe-money-gen] - then M.delete currency m
  833. 1056.40 s [really-safe-money-gen] - else M.insert currency r m
  834. 1056.40 s [really-safe-money-gen]
  835. 1056.40 s [really-safe-money-gen] -- | Try to convert every amount to one currency.
  836. 1056.40 s [really-safe-money-gen] --
  837. 1056.40 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:106:12-28
  838. 1056.40 s [really-safe-money-gen] @@ -103,7 +103,7 @@
  839. 1056.40 s [really-safe-money-gen] Just a -> do
  840. 1056.40 s [really-safe-money-gen] r <- Amount.add a amount
  841. 1056.40 s [really-safe-money-gen] Just $
  842. 1056.40 s [really-safe-money-gen] - if r == Amount.zero
  843. 1056.40 s [really-safe-money-gen] + if True
  844. 1056.40 s [really-safe-money-gen] then M.delete currency m
  845. 1056.40 s [really-safe-money-gen] else M.insert currency r m
  846. 1056.40 s [really-safe-money-gen]
  847. 1056.40 s [really-safe-money-gen] Testing mutation Arith at src/Money/MultiAmount.hs:182:15-106
  848. 1056.41 s [really-safe-money-gen] @@ -179,7 +179,7 @@
  849. 1056.41 s [really-safe-money-gen] . traverse
  850. 1056.41 s [really-safe-money-gen] ( \(currency, a) ->
  851. 1056.41 s [really-safe-money-gen] ( \(cr, qf2) ->
  852. 1056.41 s [really-safe-money-gen] - fromIntegral (Amount.toMinimalQuantisations a) * ConversionRate.conversionFactor qf2 cr qf1
  853. 1056.41 s [really-safe-money-gen] + fromIntegral (Amount.toMinimalQuantisations a) - ConversionRate.conversionFactor qf2 cr qf1
  854. 1056.41 s [really-safe-money-gen] )
  855. 1056.41 s [really-safe-money-gen] <$> func currency
  856. 1056.41 s [really-safe-money-gen] )
  857. 1056.41 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:101:22-37
  858. 1056.41 s [really-safe-money-gen] @@ -98,14 +98,13 @@
  859. 1056.41 s [really-safe-money-gen] addAmount :: (Ord currency) => MultiAmount currency -> currency -> Amount -> Maybe (MultiAmount currency)
  860. 1056.41 s [really-safe-money-gen] addAmount m _ (Amount 0) = Just m
  861. 1056.41 s [really-safe-money-gen] addAmount (MultiAmount m) currency amount =
  862. 1056.41 s [really-safe-money-gen] fmap MultiAmount $ case M.lookup currency m of
  863. 1056.41 s [really-safe-money-gen] - Nothing -> Just $ M.insert currency amount m
  864. 1056.41 s [really-safe-money-gen] Just a -> do
  865. 1056.41 s [really-safe-money-gen] r <- Amount.add a amount
  866. 1056.41 s [really-safe-money-gen] Just $
  867. 1056.41 s [really-safe-money-gen] if r == Amount.zero
  868. 1056.41 s [really-safe-money-gen] then M.delete currency m
  869. 1056.41 s [really-safe-money-gen] else M.insert currency r m
  870. 1056.41 s [really-safe-money-gen]
  871. 1056.41 s [really-safe-money-gen] -- | Subtract an 'Amount' from a 'MultiAmount'
  872. 1056.41 s [really-safe-money-gen] subtractAmount :: (Ord currency) => MultiAmount currency -> currency -> Amount -> Maybe (MultiAmount currency)
  873. 1056.41 s [really-safe-money-gen] Testing mutation Negate at src/Money/MultiAmount.hs:66:13-29
  874. 1056.41 s [really-safe-money-gen] @@ -63,7 +63,7 @@
  875. 1056.41 s [really-safe-money-gen] [ genericValidate ma,
  876. 1056.41 s [really-safe-money-gen] decorateMap m $ \_ a ->
  877. 1056.41 s [really-safe-money-gen] declare "The amount is not zero" $
  878. 1056.41 s [really-safe-money-gen] - a /= Amount.zero
  879. 1056.41 s [really-safe-money-gen] + not (a /= Amount.zero)
  880. 1056.41 s [really-safe-money-gen] ]
  881. 1056.41 s [really-safe-money-gen]
  882. 1056.41 s [really-safe-money-gen] instance (NFData currency) => NFData (MultiAmount currency)
  883. 1056.41 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:66:13-29
  884. 1056.41 s [really-safe-money-gen] @@ -63,7 +63,7 @@
  885. 1056.41 s [really-safe-money-gen] [ genericValidate ma,
  886. 1056.41 s [really-safe-money-gen] decorateMap m $ \_ a ->
  887. 1056.41 s [really-safe-money-gen] declare "The amount is not zero" $
  888. 1056.41 s [really-safe-money-gen] - a /= Amount.zero
  889. 1056.41 s [really-safe-money-gen] + False
  890. 1056.41 s [really-safe-money-gen] ]
  891. 1056.41 s [really-safe-money-gen]
  892. 1056.41 s [really-safe-money-gen] instance (NFData currency) => NFData (MultiAmount currency)
  893. 1056.41 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/AmountOf.hs:215:29-113
  894. 1056.41 s [really-safe-money-gen] @@ -212,11 +212,10 @@
  895. 1056.41 s [really-safe-money-gen]
  896. 1056.41 s [really-safe-money-gen] -- | See 'Amount.distribute'
  897. 1056.41 s [really-safe-money-gen] distribute :: AmountOf currency -> Word32 -> AmountDistributionOf currency
  898. 1056.41 s [really-safe-money-gen] distribute (AmountOf a) f = case Amount.distribute a f of
  899. 1056.41 s [really-safe-money-gen] - DistributedIntoZeroChunks -> DistributedIntoZeroChunks
  900. 1056.41 s [really-safe-money-gen] DistributedZero -> DistributedZero
  901. 1056.41 s [really-safe-money-gen] DistributedIntoEqualChunks w' a' -> DistributedIntoEqualChunks w' (fromAmount a')
  902. 1056.41 s [really-safe-money-gen] DistributedIntoUnequalChunks w1 a1 w2 a2 -> DistributedIntoUnequalChunks w1 (fromAmount a1) w2 (fromAmount a2)
  903. 1056.41 s [really-safe-money-gen]
  904. 1056.41 s [really-safe-money-gen] type AmountDistributionOf (currency :: k) = Distribution (AmountOf currency)
  905. 1056.41 s [really-safe-money-gen]
  906. 1056.41 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/MultiAccount.hs:126:45-51
  907. 1056.41 s [really-safe-money-gen] @@ -123,7 +123,7 @@
  908. 1056.41 s [really-safe-money-gen]
  909. 1056.41 s [really-safe-money-gen] -- | Add an 'Account' to a 'MultiAccount'
  910. 1056.41 s [really-safe-money-gen] subtractAccount :: (Ord currency) => MultiAccount currency -> currency -> Account -> Maybe (MultiAccount currency)
  911. 1056.41 s [really-safe-money-gen] -subtractAccount m _ (Positive (Amount 0)) = Just m
  912. 1056.41 s [really-safe-money-gen] +subtractAccount m _ (Positive (Amount 0)) = Nothing
  913. 1056.41 s [really-safe-money-gen] subtractAccount m _ (Negative (Amount 0)) = Just m
  914. 1056.41 s [really-safe-money-gen] subtractAccount (MultiAccount m) currency account =
  915. 1056.41 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  916. 1056.42 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/MultiAccount.hs:127:45-51
  917. 1056.42 s [really-safe-money-gen] @@ -124,7 +124,7 @@
  918. 1056.42 s [really-safe-money-gen] -- | Add an 'Account' to a 'MultiAccount'
  919. 1056.42 s [really-safe-money-gen] subtractAccount :: (Ord currency) => MultiAccount currency -> currency -> Account -> Maybe (MultiAccount currency)
  920. 1056.42 s [really-safe-money-gen] subtractAccount m _ (Positive (Amount 0)) = Just m
  921. 1056.42 s [really-safe-money-gen] -subtractAccount m _ (Negative (Amount 0)) = Just m
  922. 1056.42 s [really-safe-money-gen] +subtractAccount m _ (Negative (Amount 0)) = Nothing
  923. 1056.42 s [really-safe-money-gen] subtractAccount (MultiAccount m) currency account =
  924. 1056.42 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  925. 1056.42 s [really-safe-money-gen] Nothing -> Just $ M.insert currency (Account.negate account) m
  926. 1056.42 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAccount.hs:134:12-29
  927. 1056.42 s [really-safe-money-gen] @@ -131,7 +131,7 @@
  928. 1056.42 s [really-safe-money-gen] Just a -> do
  929. 1056.42 s [really-safe-money-gen] r <- Account.subtract a account
  930. 1056.42 s [really-safe-money-gen] Just $
  931. 1056.42 s [really-safe-money-gen] - if r == Account.zero
  932. 1056.42 s [really-safe-money-gen] + if True
  933. 1056.42 s [really-safe-money-gen] then M.delete currency m
  934. 1056.42 s [really-safe-money-gen] else M.insert currency r m
  935. 1056.42 s [really-safe-money-gen]
  936. 1056.42 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAccount.hs:134:12-29
  937. 1056.42 s [really-safe-money-gen] @@ -131,7 +131,7 @@
  938. 1056.42 s [really-safe-money-gen] Just a -> do
  939. 1056.42 s [really-safe-money-gen] r <- Account.subtract a account
  940. 1056.42 s [really-safe-money-gen] Just $
  941. 1056.42 s [really-safe-money-gen] - if r == Account.zero
  942. 1056.42 s [really-safe-money-gen] + if False
  943. 1056.42 s [really-safe-money-gen] then M.delete currency m
  944. 1056.42 s [really-safe-money-gen] else M.insert currency r m
  945. 1056.42 s [really-safe-money-gen]
  946. 1056.42 s [really-safe-money-gen] Testing mutation Negate at src/Money/MultiAccount.hs:134:12-29
  947. 1056.42 s [really-safe-money-gen] @@ -131,7 +131,7 @@
  948. 1056.42 s [really-safe-money-gen] Just a -> do
  949. 1056.42 s [really-safe-money-gen] r <- Account.subtract a account
  950. 1056.42 s [really-safe-money-gen] Just $
  951. 1056.42 s [really-safe-money-gen] - if r == Account.zero
  952. 1056.42 s [really-safe-money-gen] + if not (r == Account.zero)
  953. 1056.42 s [really-safe-money-gen] then M.delete currency m
  954. 1056.42 s [really-safe-money-gen] else M.insert currency r m
  955. 1056.42 s [really-safe-money-gen]
  956. 1056.42 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:129:23-37
  957. 1056.42 s [really-safe-money-gen] @@ -126,14 +126,13 @@
  958. 1056.42 s [really-safe-money-gen] subtractAccount m _ (Positive (Amount 0)) = Just m
  959. 1056.42 s [really-safe-money-gen] subtractAccount m _ (Negative (Amount 0)) = Just m
  960. 1056.42 s [really-safe-money-gen] subtractAccount (MultiAccount m) currency account =
  961. 1056.42 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  962. 1056.42 s [really-safe-money-gen] - Nothing -> Just $ M.insert currency (Account.negate account) m
  963. 1056.42 s [really-safe-money-gen] Just a -> do
  964. 1056.42 s [really-safe-money-gen] r <- Account.subtract a account
  965. 1056.42 s [really-safe-money-gen] Just $
  966. 1056.42 s [really-safe-money-gen] if r == Account.zero
  967. 1056.42 s [really-safe-money-gen] then M.delete currency m
  968. 1056.42 s [really-safe-money-gen] else M.insert currency r m
  969. 1056.42 s [really-safe-money-gen]
  970. 1056.42 s [really-safe-money-gen] -- | Try to convert every account to one currency.
  971. 1056.42 s [really-safe-money-gen] --
  972. 1056.42 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:129:23-37
  973. 1056.42 s [really-safe-money-gen] @@ -126,14 +126,8 @@
  974. 1056.42 s [really-safe-money-gen] subtractAccount m _ (Positive (Amount 0)) = Just m
  975. 1056.42 s [really-safe-money-gen] subtractAccount m _ (Negative (Amount 0)) = Just m
  976. 1056.42 s [really-safe-money-gen] subtractAccount (MultiAccount m) currency account =
  977. 1056.42 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  978. 1056.42 s [really-safe-money-gen] Nothing -> Just $ M.insert currency (Account.negate account) m
  979. 1056.42 s [really-safe-money-gen] - Just a -> do
  980. 1056.43 s [really-safe-money-gen] - r <- Account.subtract a account
  981. 1056.43 s [really-safe-money-gen] - Just $
  982. 1056.43 s [really-safe-money-gen] - if r == Account.zero
  983. 1056.43 s [really-safe-money-gen] - then M.delete currency m
  984. 1056.43 s [really-safe-money-gen] - else M.insert currency r m
  985. 1056.43 s [really-safe-money-gen]
  986. 1056.43 s [really-safe-money-gen] -- | Try to convert every account to one currency.
  987. 1056.43 s [really-safe-money-gen] --
  988. 1056.43 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/MultiAccount.hs:113:40-46
  989. 1056.43 s [really-safe-money-gen] @@ -110,7 +110,7 @@
  990. 1056.43 s [really-safe-money-gen] -- | Add an 'Account' to a 'MultiAccount'
  991. 1056.43 s [really-safe-money-gen] addAccount :: (Ord currency) => MultiAccount currency -> currency -> Account -> Maybe (MultiAccount currency)
  992. 1056.43 s [really-safe-money-gen] addAccount m _ (Positive (Amount 0)) = Just m
  993. 1056.43 s [really-safe-money-gen] -addAccount m _ (Negative (Amount 0)) = Just m
  994. 1056.43 s [really-safe-money-gen] +addAccount m _ (Negative (Amount 0)) = Nothing
  995. 1061.08 s [really-safe-money-gen] addAccount (MultiAccount m) currency account =
  996. 1061.15 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  997. 1061.15 s [really-safe-money-gen] Nothing -> Just $ M.insert currency account m
  998. 1061.15 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAccount.hs:120:12-29
  999. 1061.15 s [really-safe-money-gen] @@ -117,7 +117,7 @@
  1000. 1061.15 s [really-safe-money-gen] Just a -> do
  1001. 1061.15 s [really-safe-money-gen] r <- Account.add a account
  1002. 1061.15 s [really-safe-money-gen] Just $
  1003. 1061.15 s [really-safe-money-gen] - if r == Account.zero
  1004. 1061.15 s [really-safe-money-gen] + if True
  1005. 1061.15 s [really-safe-money-gen] then M.delete currency m
  1006. 1061.15 s [really-safe-money-gen] else M.insert currency r m
  1007. 1061.16 s [really-safe-money-gen]
  1008. 1061.16 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAccount.hs:120:12-29
  1009. 1061.16 s [really-safe-money-gen] @@ -117,7 +117,7 @@
  1010. 1061.16 s [really-safe-money-gen] Just a -> do
  1011. 1061.16 s [really-safe-money-gen] r <- Account.add a account
  1012. 1061.16 s [really-safe-money-gen] Just $
  1013. 1061.16 s [really-safe-money-gen] - if r == Account.zero
  1014. 1061.16 s [really-safe-money-gen] + if False
  1015. 1061.16 s [really-safe-money-gen] then M.delete currency m
  1016. 1061.16 s [really-safe-money-gen] else M.insert currency r m
  1017. 1061.16 s [really-safe-money-gen]
  1018. 1061.16 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:180:25-32
  1019. 1061.16 s [really-safe-money-gen] @@ -177,10 +177,9 @@
  1020. 1061.16 s [really-safe-money-gen] RoundNearest -> round
  1021. 1061.16 s [really-safe-money-gen] roundedResult :: Integer
  1022. 1061.16 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  1023. 1061.16 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  1024. 1061.16 s [really-safe-money-gen] LT -> RoundedDown
  1025. 1061.16 s [really-safe-money-gen] EQ -> DidNotRound
  1026. 1061.16 s [really-safe-money-gen] - GT -> RoundedUp
  1027. 1061.16 s [really-safe-money-gen] in (Account.fromMinimalQuantisations roundedResult, rounded)
  1028. 1061.16 s [really-safe-money-gen] )
  1029. 1061.16 s [really-safe-money-gen] . Prelude.sum
  1030. 1061.16 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:73:6-27
  1031. 1061.16 s [really-safe-money-gen] @@ -70,7 +70,7 @@
  1032. 1061.16 s [really-safe-money-gen]
  1033. 1061.16 s [really-safe-money-gen] fromAmount :: currency -> Amount -> MultiAmount currency
  1034. 1061.16 s [really-safe-money-gen] fromAmount currency amount =
  1035. 1061.16 s [really-safe-money-gen] - if amount == Amount.zero
  1036. 1061.16 s [really-safe-money-gen] + if True
  1037. 1061.16 s [really-safe-money-gen] then zero
  1038. 1061.16 s [really-safe-money-gen] else MultiAmount $ M.singleton currency amount
  1039. 1061.16 s [really-safe-money-gen]
  1040. 1061.16 s [really-safe-money-gen] Testing mutation Negate at src/Money/MultiAccount.hs:120:12-29
  1041. 1061.16 s [really-safe-money-gen] @@ -117,7 +117,7 @@
  1042. 1061.16 s [really-safe-money-gen] Just a -> do
  1043. 1061.16 s [really-safe-money-gen] r <- Account.add a account
  1044. 1061.16 s [really-safe-money-gen] Just $
  1045. 1061.16 s [really-safe-money-gen] - if r == Account.zero
  1046. 1061.16 s [really-safe-money-gen] + if not (r == Account.zero)
  1047. 1061.16 s [really-safe-money-gen] then M.delete currency m
  1048. 1061.16 s [really-safe-money-gen] else M.insert currency r m
  1049. 1061.16 s [really-safe-money-gen]
  1050. 1061.16 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:66:13-29
  1051. 1061.17 s [really-safe-money-gen] @@ -63,7 +63,7 @@
  1052. 1061.17 s [really-safe-money-gen] [ genericValidate ma,
  1053. 1061.17 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1054. 1061.17 s [really-safe-money-gen] declare "The amount is not zero" $
  1055. 1061.17 s [really-safe-money-gen] - a /= Amount.zero
  1056. 1061.17 s [really-safe-money-gen] + True
  1057. 1061.17 s [really-safe-money-gen] ]
  1058. 1061.17 s [really-safe-money-gen]
  1059. 1061.17 s [really-safe-money-gen] instance (NFData currency) => NFData (MultiAmount currency)
  1060. 1061.17 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:115:23-37
  1061. 1061.17 s [really-safe-money-gen] @@ -112,14 +112,8 @@
  1062. 1061.17 s [really-safe-money-gen] addAccount m _ (Positive (Amount 0)) = Just m
  1063. 1061.17 s [really-safe-money-gen] addAccount m _ (Negative (Amount 0)) = Just m
  1064. 1061.17 s [really-safe-money-gen] addAccount (MultiAccount m) currency account =
  1065. 1061.17 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  1066. 1061.17 s [really-safe-money-gen] Nothing -> Just $ M.insert currency account m
  1067. 1061.17 s [really-safe-money-gen] - Just a -> do
  1068. 1061.17 s [really-safe-money-gen] - r <- Account.add a account
  1069. 1061.17 s [really-safe-money-gen] - Just $
  1070. 1061.17 s [really-safe-money-gen] - if r == Account.zero
  1071. 1061.17 s [really-safe-money-gen] - then M.delete currency m
  1072. 1061.17 s [really-safe-money-gen] - else M.insert currency r m
  1073. 1061.17 s [really-safe-money-gen]
  1074. 1061.17 s [really-safe-money-gen] -- | Add an 'Account' to a 'MultiAccount'
  1075. 1061.17 s [really-safe-money-gen] subtractAccount :: (Ord currency) => MultiAccount currency -> currency -> Account -> Maybe (MultiAccount currency)
  1076. 1061.17 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAccount.hs:78:6-28
  1077. 1061.17 s [really-safe-money-gen] @@ -75,7 +75,7 @@
  1078. 1061.17 s [really-safe-money-gen]
  1079. 1061.17 s [really-safe-money-gen] fromAccount :: currency -> Account -> MultiAccount currency
  1080. 1061.17 s [really-safe-money-gen] fromAccount currency amount =
  1081. 1061.17 s [really-safe-money-gen] - if amount == Account.zero
  1082. 1061.17 s [really-safe-money-gen] + if True
  1083. 1061.17 s [really-safe-money-gen] then zero
  1084. 1061.17 s [really-safe-money-gen] else MultiAccount $ M.singleton currency amount
  1085. 1061.17 s [really-safe-money-gen]
  1086. 1061.17 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAccount.hs:78:6-28
  1087. 1061.17 s [really-safe-money-gen] @@ -75,7 +75,7 @@
  1088. 1061.17 s [really-safe-money-gen]
  1089. 1061.17 s [really-safe-money-gen] fromAccount :: currency -> Account -> MultiAccount currency
  1090. 1061.17 s [really-safe-money-gen] fromAccount currency amount =
  1091. 1061.17 s [really-safe-money-gen] - if amount == Account.zero
  1092. 1061.17 s [really-safe-money-gen] + if False
  1093. 1061.17 s [really-safe-money-gen] then zero
  1094. 1061.17 s [really-safe-money-gen] else MultiAccount $ M.singleton currency amount
  1095. 1061.17 s [really-safe-money-gen]
  1096. 1061.17 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:106:12-28
  1097. 1061.17 s [really-safe-money-gen] @@ -103,7 +103,7 @@
  1098. 1061.17 s [really-safe-money-gen] Just a -> do
  1099. 1061.17 s [really-safe-money-gen] r <- Amount.add a amount
  1100. 1061.17 s [really-safe-money-gen] Just $
  1101. 1061.17 s [really-safe-money-gen] - if r == Amount.zero
  1102. 1061.17 s [really-safe-money-gen] + if False
  1103. 1061.17 s [really-safe-money-gen] then M.delete currency m
  1104. 1061.17 s [really-safe-money-gen] else M.insert currency r m
  1105. 1061.18 s [really-safe-money-gen]
  1106. 1061.18 s [really-safe-money-gen] Testing mutation Negate at src/Money/MultiAccount.hs:78:6-28
  1107. 1061.18 s [really-safe-money-gen] @@ -75,7 +75,7 @@
  1108. 1061.18 s [really-safe-money-gen]
  1109. 1061.18 s [really-safe-money-gen] fromAccount :: currency -> Account -> MultiAccount currency
  1110. 1061.18 s [really-safe-money-gen] fromAccount currency amount =
  1111. 1061.18 s [really-safe-money-gen] - if amount == Account.zero
  1112. 1061.18 s [really-safe-money-gen] + if not (amount == Account.zero)
  1113. 1061.18 s [really-safe-money-gen] then zero
  1114. 1061.18 s [really-safe-money-gen] else MultiAccount $ M.singleton currency amount
  1115. 1061.18 s [really-safe-money-gen]
  1116. 1061.18 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAccount.hs:69:13-30
  1117. 1061.18 s [really-safe-money-gen] @@ -66,7 +66,7 @@
  1118. 1061.18 s [really-safe-money-gen] [ genericValidate ma,
  1119. 1061.18 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1120. 1061.18 s [really-safe-money-gen] declare "The account is not zero" $
  1121. 1061.18 s [really-safe-money-gen] - a /= Account.zero
  1122. 1061.18 s [really-safe-money-gen] + True
  1123. 1061.18 s [really-safe-money-gen] ]
  1124. 1061.18 s [really-safe-money-gen]
  1125. 1061.18 s [really-safe-money-gen] -- TODO no empty currencies
  1126. 1061.18 s [really-safe-money-gen] Testing mutation Negate at src/Money/MultiAccount.hs:69:13-30
  1127. 1061.18 s [really-safe-money-gen] @@ -66,7 +66,7 @@
  1128. 1061.18 s [really-safe-money-gen] [ genericValidate ma,
  1129. 1061.18 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1130. 1061.18 s [really-safe-money-gen] declare "The account is not zero" $
  1131. 1061.18 s [really-safe-money-gen] - a /= Account.zero
  1132. 1061.18 s [really-safe-money-gen] + not (a /= Account.zero)
  1133. 1061.18 s [really-safe-money-gen] ]
  1134. 1061.18 s [really-safe-money-gen]
  1135. 1061.18 s [really-safe-money-gen] -- TODO no empty currencies
  1136. 1061.18 s [really-safe-money-gen] Testing mutation ListLit at src/Money/MultiAccount.hs:66:7-8
  1137. 1061.18 s [really-safe-money-gen] @@ -63,11 +63,7 @@
  1138. 1061.18 s [really-safe-money-gen] instance (Validity currency, Show currency, Ord currency) => Validity (MultiAccount currency) where
  1139. 1061.18 s [really-safe-money-gen] validate ma@(MultiAccount m) =
  1140. 1061.18 s [really-safe-money-gen] mconcat
  1141. 1061.18 s [really-safe-money-gen] - [ genericValidate ma,
  1142. 1061.18 s [really-safe-money-gen] - decorateMap m $ \_ a ->
  1143. 1061.18 s [really-safe-money-gen] - declare "The account is not zero" $
  1144. 1061.18 s [really-safe-money-gen] - a /= Account.zero
  1145. 1061.18 s [really-safe-money-gen] ]
  1146. 1061.18 s [really-safe-money-gen]
  1147. 1061.18 s [really-safe-money-gen] -- TODO no empty currencies
  1148. 1061.18 s [really-safe-money-gen]
  1149. 1061.18 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/QuantisationFactor/Codec.hs:41:11-26
  1150. 1061.18 s [really-safe-money-gen] @@ -38,6 +38,5 @@
  1151. 1061.18 s [really-safe-money-gen] codec
  1152. 1061.18 s [really-safe-money-gen] <?> "QuantisationFactor"
  1153. 1061.18 s [really-safe-money-gen] where
  1154. 1061.18 s [really-safe-money-gen] f w = case QuantisationFactor.fromWord32 w of
  1155. 1061.18 s [really-safe-money-gen] - Nothing -> Left $ "Unable to parse as a quantisation factor: " <> show w
  1156. 1061.18 s [really-safe-money-gen] Just qf -> Right qf
  1157. 1061.18 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/QuantisationFactor/Codec.hs:41:11-26
  1158. 1061.18 s [really-safe-money-gen] @@ -38,6 +38,5 @@
  1159. 1061.18 s [really-safe-money-gen] codec
  1160. 1061.18 s [really-safe-money-gen] <?> "QuantisationFactor"
  1161. 1061.18 s [really-safe-money-gen] where
  1162. 1061.18 s [really-safe-money-gen] f w = case QuantisationFactor.fromWord32 w of
  1163. 1061.18 s [really-safe-money-gen] Nothing -> Left $ "Unable to parse as a quantisation factor: " <> show w
  1164. 1061.18 s [really-safe-money-gen] - Just qf -> Right qf
  1165. 1061.18 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Amount/Codec.hs:47:33-75
  1166. 1061.18 s [really-safe-money-gen] @@ -44,7 +44,6 @@
  1167. 1061.18 s [really-safe-money-gen] where
  1168. 1061.18 s [really-safe-money-gen] f :: String -> Either String Amount
  1169. 1061.18 s [really-safe-money-gen] f s = case readMaybe s of
  1170. 1061.18 s [really-safe-money-gen] - Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1171. 1061.18 s [really-safe-money-gen] Just i ->
  1172. 1061.18 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1173. 1061.18 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1174. 1061.18 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount/Codec.hs:49:12-59
  1175. 1061.18 s [really-safe-money-gen] @@ -46,7 +46,7 @@
  1176. 1061.18 s [really-safe-money-gen] f s = case readMaybe s of
  1177. 1061.18 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1178. 1061.18 s [really-safe-money-gen] Just i ->
  1179. 1061.18 s [really-safe-money-gen] - if (i :: Integer) < toInteger (minBound :: Word64)
  1180. 1061.18 s [really-safe-money-gen] + if (i :: Integer) <= toInteger (minBound :: Word64)
  1181. 1061.18 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1182. 1061.18 s [really-safe-money-gen] else
  1183. 1063.78 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1184. 1063.78 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount/Codec.hs:49:12-59
  1185. 1063.78 s [really-safe-money-gen] @@ -46,7 +46,7 @@
  1186. 1063.78 s [really-safe-money-gen] f s = case readMaybe s of
  1187. 1063.78 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1188. 1063.78 s [really-safe-money-gen] Just i ->
  1189. 1063.78 s [really-safe-money-gen] - if (i :: Integer) < toInteger (minBound :: Word64)
  1190. 1063.78 s [really-safe-money-gen] + if (i :: Integer) > toInteger (minBound :: Word64)
  1191. 1063.78 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1192. 1063.78 s [really-safe-money-gen] else
  1193. 1063.78 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1194. 1063.78 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount/Codec.hs:49:12-59
  1195. 1063.78 s [really-safe-money-gen] @@ -46,7 +46,7 @@
  1196. 1063.78 s [really-safe-money-gen] f s = case readMaybe s of
  1197. 1063.78 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1198. 1063.78 s [really-safe-money-gen] Just i ->
  1199. 1063.78 s [really-safe-money-gen] - if (i :: Integer) < toInteger (minBound :: Word64)
  1200. 1063.78 s [really-safe-money-gen] + if (i :: Integer) >= toInteger (minBound :: Word64)
  1201. 1063.78 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1202. 1063.78 s [really-safe-money-gen] else
  1203. 1063.78 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1204. 1063.78 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAccount.hs:69:13-30
  1205. 1063.78 s [really-safe-money-gen] @@ -66,7 +66,7 @@
  1206. 1063.78 s [really-safe-money-gen] [ genericValidate ma,
  1207. 1063.78 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1208. 1063.79 s [really-safe-money-gen] declare "The account is not zero" $
  1209. 1063.79 s [really-safe-money-gen] - a /= Account.zero
  1210. 1063.79 s [really-safe-money-gen] + False
  1211. 1063.79 s [really-safe-money-gen] ]
  1212. 1063.79 s [really-safe-money-gen]
  1213. 1063.79 s [really-safe-money-gen] -- TODO no empty currencies
  1214. 1063.79 s [really-safe-money-gen] Testing mutation ListLit at src/Money/MultiAmount.hs:63:7-8
  1215. 1063.79 s [really-safe-money-gen] @@ -60,11 +60,7 @@
  1216. 1063.79 s [really-safe-money-gen] instance (Validity currency, Show currency, Ord currency) => Validity (MultiAmount currency) where
  1217. 1063.79 s [really-safe-money-gen] validate ma@(MultiAmount m) =
  1218. 1063.79 s [really-safe-money-gen] mconcat
  1219. 1063.79 s [really-safe-money-gen] - [ genericValidate ma,
  1220. 1063.79 s [really-safe-money-gen] - decorateMap m $ \_ a ->
  1221. 1063.79 s [really-safe-money-gen] - declare "The amount is not zero" $
  1222. 1063.79 s [really-safe-money-gen] - a /= Amount.zero
  1223. 1063.79 s [really-safe-money-gen] ]
  1224. 1063.79 s [really-safe-money-gen]
  1225. 1063.79 s [really-safe-money-gen] instance (NFData currency) => NFData (MultiAmount currency)
  1226. 1063.79 s [really-safe-money-gen]
  1227. 1063.79 s [really-safe-money-gen] Testing mutation Arith at src/Money/MultiAccount.hs:192:19-51
  1228. 1063.79 s [really-safe-money-gen] @@ -189,8 +189,8 @@
  1229. 1063.79 s [really-safe-money-gen] ( \(currency, a) ->
  1230. 1063.79 s [really-safe-money-gen] ( \(cr, qf2) ->
  1231. 1063.79 s [really-safe-money-gen] let factor = ConversionRate.conversionFactor qf2 cr qf1
  1232. 1063.79 s [really-safe-money-gen] in Account.toMinimalQuantisations a
  1233. 1063.79 s [really-safe-money-gen] - * toInteger (numerator factor)
  1234. 1063.79 s [really-safe-money-gen] + - toInteger (numerator factor)
  1235. 1063.79 s [really-safe-money-gen] % toInteger (denominator factor)
  1236. 1063.79 s [really-safe-money-gen] )
  1237. 1063.79 s [really-safe-money-gen] <$> func currency
  1238. 1063.79 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAmount.hs:101:22-37
  1239. 1063.79 s [really-safe-money-gen] @@ -98,14 +98,8 @@
  1240. 1063.79 s [really-safe-money-gen] addAmount :: (Ord currency) => MultiAmount currency -> currency -> Amount -> Maybe (MultiAmount currency)
  1241. 1063.79 s [really-safe-money-gen] addAmount m _ (Amount 0) = Just m
  1242. 1063.79 s [really-safe-money-gen] addAmount (MultiAmount m) currency amount =
  1243. 1063.79 s [really-safe-money-gen] fmap MultiAmount $ case M.lookup currency m of
  1244. 1063.79 s [really-safe-money-gen] Nothing -> Just $ M.insert currency amount m
  1245. 1063.79 s [really-safe-money-gen] - Just a -> do
  1246. 1063.80 s [really-safe-money-gen] - r <- Amount.add a amount
  1247. 1063.80 s [really-safe-money-gen] - Just $
  1248. 1063.80 s [really-safe-money-gen] - if r == Amount.zero
  1249. 1063.80 s [really-safe-money-gen] - then M.delete currency m
  1250. 1063.80 s [really-safe-money-gen] - else M.insert currency r m
  1251. 1063.80 s [really-safe-money-gen]
  1252. 1063.80 s [really-safe-money-gen] -- | Subtract an 'Amount' from a 'MultiAmount'
  1253. 1063.80 s [really-safe-money-gen] subtractAmount :: (Ord currency) => MultiAmount currency -> currency -> Amount -> Maybe (MultiAmount currency)
  1254. 1063.80 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Amount/Codec.hs:50:31-84
  1255. 1063.80 s [really-safe-money-gen] @@ -47,7 +47,6 @@
  1256. 1063.80 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1257. 1063.80 s [really-safe-money-gen] Just i ->
  1258. 1063.80 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1259. 1063.80 s [really-safe-money-gen] - then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1260. 1063.80 s [really-safe-money-gen] else
  1261. 1063.80 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1262. 1063.80 s [really-safe-money-gen] then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1263. 1063.80 s [really-safe-money-gen] Testing mutation Negate at src/Money/MultiAmount.hs:73:6-27
  1264. 1063.80 s [really-safe-money-gen] @@ -70,7 +70,7 @@
  1265. 1063.80 s [really-safe-money-gen]
  1266. 1063.80 s [really-safe-money-gen] fromAmount :: currency -> Amount -> MultiAmount currency
  1267. 1063.80 s [really-safe-money-gen] fromAmount currency amount =
  1268. 1063.80 s [really-safe-money-gen] - if amount == Amount.zero
  1269. 1063.80 s [really-safe-money-gen] + if not (amount == Amount.zero)
  1270. 1063.80 s [really-safe-money-gen] then zero
  1271. 1063.80 s [really-safe-money-gen] else MultiAmount $ M.singleton currency amount
  1272. 1063.80 s [really-safe-money-gen]
  1273. 1063.80 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount/Codec.hs:49:12-59
  1274. 1063.80 s [really-safe-money-gen] @@ -46,7 +46,7 @@
  1275. 1063.80 s [really-safe-money-gen] f s = case readMaybe s of
  1276. 1063.80 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1277. 1063.80 s [really-safe-money-gen] Just i ->
  1278. 1063.80 s [really-safe-money-gen] - if (i :: Integer) < toInteger (minBound :: Word64)
  1279. 1063.80 s [really-safe-money-gen] + if True
  1280. 1063.80 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1281. 1063.80 s [really-safe-money-gen] else
  1282. 1063.80 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1283. 1063.80 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:174:25-38
  1284. 1063.80 s [really-safe-money-gen] @@ -171,10 +171,9 @@
  1285. 1063.80 s [really-safe-money-gen] fmap
  1286. 1063.80 s [really-safe-money-gen] ( ( \theoreticalResult ->
  1287. 1063.80 s [really-safe-money-gen] let rounder :: Rational -> Integer
  1288. 1063.80 s [really-safe-money-gen] rounder = case r of
  1289. 1063.80 s [really-safe-money-gen] RoundUp -> ceiling
  1290. 1063.80 s [really-safe-money-gen] RoundDown -> floor
  1291. 1063.80 s [really-safe-money-gen] - RoundNearest -> round
  1292. 1063.80 s [really-safe-money-gen] roundedResult :: Integer
  1293. 1063.80 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  1294. 1063.80 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  1295. 1063.80 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount/Codec.hs:49:12-59
  1296. 1063.80 s [really-safe-money-gen] @@ -46,7 +46,7 @@
  1297. 1063.80 s [really-safe-money-gen] f s = case readMaybe s of
  1298. 1063.80 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1299. 1063.80 s [really-safe-money-gen] Just i ->
  1300. 1063.80 s [really-safe-money-gen] - if (i :: Integer) < toInteger (minBound :: Word64)
  1301. 1063.80 s [really-safe-money-gen] + if False
  1302. 1063.80 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1303. 1063.80 s [really-safe-money-gen] else
  1304. 1063.80 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1305. 1063.80 s [really-safe-money-gen] Testing mutation ListLit at src/Money/MultiAmount.hs:63:7-8
  1306. 1063.80 s [really-safe-money-gen] @@ -60,11 +60,10 @@
  1307. 1063.80 s [really-safe-money-gen] instance (Validity currency, Show currency, Ord currency) => Validity (MultiAmount currency) where
  1308. 1063.80 s [really-safe-money-gen] validate ma@(MultiAmount m) =
  1309. 1063.80 s [really-safe-money-gen] mconcat
  1310. 1063.80 s [really-safe-money-gen] - [ genericValidate ma,
  1311. 1063.80 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1312. 1063.80 s [really-safe-money-gen] declare "The amount is not zero" $
  1313. 1063.80 s [really-safe-money-gen] a /= Amount.zero
  1314. 1063.80 s [really-safe-money-gen] ]
  1315. 1063.80 s [really-safe-money-gen]
  1316. 1063.80 s [really-safe-money-gen] instance (NFData currency) => NFData (MultiAmount currency)
  1317. 1063.80 s [really-safe-money-gen]
  1318. 1063.80 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/AmountOf.hs:215:29-113
  1319. 1063.81 s [really-safe-money-gen] @@ -212,11 +212,10 @@
  1320. 1063.81 s [really-safe-money-gen]
  1321. 1063.81 s [really-safe-money-gen] -- | See 'Amount.distribute'
  1322. 1063.81 s [really-safe-money-gen] distribute :: AmountOf currency -> Word32 -> AmountDistributionOf currency
  1323. 1063.81 s [really-safe-money-gen] distribute (AmountOf a) f = case Amount.distribute a f of
  1324. 1063.81 s [really-safe-money-gen] DistributedIntoZeroChunks -> DistributedIntoZeroChunks
  1325. 1063.81 s [really-safe-money-gen] DistributedZero -> DistributedZero
  1326. 1063.81 s [really-safe-money-gen] DistributedIntoEqualChunks w' a' -> DistributedIntoEqualChunks w' (fromAmount a')
  1327. 1063.81 s [really-safe-money-gen] - DistributedIntoUnequalChunks w1 a1 w2 a2 -> DistributedIntoUnequalChunks w1 (fromAmount a1) w2 (fromAmount a2)
  1328. 1063.81 s [really-safe-money-gen]
  1329. 1063.81 s [really-safe-money-gen] type AmountDistributionOf (currency :: k) = Distribution (AmountOf currency)
  1330. 1063.81 s [really-safe-money-gen]
  1331. 1063.81 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Amount/Codec.hs:47:33-75
  1332. 1063.81 s [really-safe-money-gen] @@ -44,7 +44,6 @@
  1333. 1063.81 s [really-safe-money-gen] where
  1334. 1063.81 s [really-safe-money-gen] f :: String -> Either String Amount
  1335. 1063.81 s [really-safe-money-gen] f s = case readMaybe s of
  1336. 1063.81 s [really-safe-money-gen] - Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1337. 1063.81 s [really-safe-money-gen] Just i ->
  1338. 1063.81 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1339. 1063.81 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1340. 1063.81 s [really-safe-money-gen] Testing mutation Arith at src/Money/MultiAccount.hs:192:19-51
  1341. 1063.81 s [really-safe-money-gen] @@ -189,8 +189,8 @@
  1342. 1063.81 s [really-safe-money-gen] ( \(currency, a) ->
  1343. 1063.81 s [really-safe-money-gen] ( \(cr, qf2) ->
  1344. 1063.81 s [really-safe-money-gen] let factor = ConversionRate.conversionFactor qf2 cr qf1
  1345. 1063.81 s [really-safe-money-gen] in Account.toMinimalQuantisations a
  1346. 1063.81 s [really-safe-money-gen] - * toInteger (numerator factor)
  1347. 1063.81 s [really-safe-money-gen] + + toInteger (numerator factor)
  1348. 1063.81 s [really-safe-money-gen] % toInteger (denominator factor)
  1349. 1063.81 s [really-safe-money-gen] )
  1350. 1063.81 s [really-safe-money-gen] <$> func currency
  1351. 1063.81 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount/Codec.hs:52:16-63
  1352. 1063.81 s [really-safe-money-gen] @@ -49,7 +49,7 @@
  1353. 1064.51 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1354. 1064.51 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1355. 1064.51 s [really-safe-money-gen] else
  1356. 1064.51 s [really-safe-money-gen] - if (i :: Integer) > toInteger (maxBound :: Word64)
  1357. 1064.51 s [really-safe-money-gen] + if (i :: Integer) <= toInteger (maxBound :: Word64)
  1358. 1064.51 s [really-safe-money-gen] then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1359. 1064.51 s [really-safe-money-gen] else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1360. 1064.51 s [really-safe-money-gen] g :: Amount -> String
  1361. 1064.51 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount/Codec.hs:52:16-63
  1362. 1064.51 s [really-safe-money-gen] @@ -49,7 +49,7 @@
  1363. 1064.51 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1364. 1064.51 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1365. 1064.51 s [really-safe-money-gen] else
  1366. 1064.52 s [really-safe-money-gen] - if (i :: Integer) > toInteger (maxBound :: Word64)
  1367. 1064.52 s [really-safe-money-gen] + if (i :: Integer) < toInteger (maxBound :: Word64)
  1368. 1064.52 s [really-safe-money-gen] then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1369. 1064.52 s [really-safe-money-gen] else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1370. 1064.52 s [really-safe-money-gen] g :: Amount -> String
  1371. 1064.52 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount/Codec.hs:52:16-63
  1372. 1064.52 s [really-safe-money-gen] @@ -49,7 +49,7 @@
  1373. 1064.52 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1374. 1064.52 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1375. 1064.52 s [really-safe-money-gen] else
  1376. 1064.52 s [really-safe-money-gen] - if (i :: Integer) > toInteger (maxBound :: Word64)
  1377. 1064.52 s [really-safe-money-gen] + if True
  1378. 1064.52 s [really-safe-money-gen] then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1379. 1064.52 s [really-safe-money-gen] else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1380. 1064.52 s [really-safe-money-gen] g :: Amount -> String
  1381. 1064.52 s [really-safe-money-gen] Testing mutation ListLit at src/Money/MultiAccount.hs:66:7-8
  1382. 1064.52 s [really-safe-money-gen] @@ -63,11 +63,10 @@
  1383. 1064.52 s [really-safe-money-gen] instance (Validity currency, Show currency, Ord currency) => Validity (MultiAccount currency) where
  1384. 1064.52 s [really-safe-money-gen] validate ma@(MultiAccount m) =
  1385. 1064.52 s [really-safe-money-gen] mconcat
  1386. 1064.52 s [really-safe-money-gen] - [ genericValidate ma,
  1387. 1064.52 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1388. 1064.52 s [really-safe-money-gen] declare "The account is not zero" $
  1389. 1064.52 s [really-safe-money-gen] a /= Account.zero
  1390. 1064.52 s [really-safe-money-gen] ]
  1391. 1064.52 s [really-safe-money-gen]
  1392. 1064.52 s [really-safe-money-gen] -- TODO no empty currencies
  1393. 1064.52 s [really-safe-money-gen]
  1394. 1064.52 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:119:12-28
  1395. 1064.52 s [really-safe-money-gen] @@ -116,7 +116,7 @@
  1396. 1064.52 s [really-safe-money-gen] Just a -> do
  1397. 1064.52 s [really-safe-money-gen] r <- Amount.subtract a amount
  1398. 1064.52 s [really-safe-money-gen] Just $
  1399. 1064.52 s [really-safe-money-gen] - if r == Amount.zero
  1400. 1064.52 s [really-safe-money-gen] + if True
  1401. 1064.52 s [really-safe-money-gen] then M.delete currency m
  1402. 1064.52 s [really-safe-money-gen] else M.insert currency r m
  1403. 1064.52 s [really-safe-money-gen]
  1404. 1064.52 s [really-safe-money-gen] Testing mutation Negate at src/Money/Amount/Codec.hs:52:16-63
  1405. 1064.53 s [really-safe-money-gen] @@ -49,7 +49,7 @@
  1406. 1064.53 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1407. 1064.53 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1408. 1064.53 s [really-safe-money-gen] else
  1409. 1064.53 s [really-safe-money-gen] - if (i :: Integer) > toInteger (maxBound :: Word64)
  1410. 1064.53 s [really-safe-money-gen] + if not ((i :: Integer) > toInteger (maxBound :: Word64))
  1411. 1064.53 s [really-safe-money-gen] then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1412. 1064.53 s [really-safe-money-gen] else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1413. 1064.53 s [really-safe-money-gen] g :: Amount -> String
  1414. 1064.53 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/Amount/Codec.hs:52:16-63
  1415. 1064.53 s [really-safe-money-gen] @@ -49,7 +49,7 @@
  1416. 1064.53 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1417. 1064.53 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1418. 1064.53 s [really-safe-money-gen] else
  1419. 1064.53 s [really-safe-money-gen] - if (i :: Integer) > toInteger (maxBound :: Word64)
  1420. 1064.53 s [really-safe-money-gen] + if False
  1421. 1064.53 s [really-safe-money-gen] then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1422. 1064.53 s [really-safe-money-gen] else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1423. 1064.53 s [really-safe-money-gen] g :: Amount -> String
  1424. 1064.53 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Amount/Codec.hs:50:31-84
  1425. 1064.53 s [really-safe-money-gen] @@ -47,7 +47,6 @@
  1426. 1064.53 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1427. 1064.53 s [really-safe-money-gen] Just i ->
  1428. 1064.53 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1429. 1064.53 s [really-safe-money-gen] - then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1430. 1064.53 s [really-safe-money-gen] else
  1431. 1064.53 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1432. 1064.53 s [really-safe-money-gen] then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1433. 1064.53 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Amount/Codec.hs:53:35-90
  1434. 1064.53 s [really-safe-money-gen] @@ -50,7 +50,6 @@
  1435. 1064.53 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1436. 1064.53 s [really-safe-money-gen] else
  1437. 1064.53 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1438. 1064.53 s [really-safe-money-gen] - then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1439. 1064.53 s [really-safe-money-gen] else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1440. 1064.53 s [really-safe-money-gen] g :: Amount -> String
  1441. 1064.53 s [really-safe-money-gen] g = show . Amount.toMinimalQuantisations
  1442. 1064.53 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Amount/Codec.hs:53:35-90
  1443. 1064.53 s [really-safe-money-gen] @@ -50,7 +50,6 @@
  1444. 1064.53 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1445. 1064.53 s [really-safe-money-gen] else
  1446. 1064.53 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1447. 1064.53 s [really-safe-money-gen] - then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1448. 1064.53 s [really-safe-money-gen] else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1449. 1064.53 s [really-safe-money-gen] g :: Amount -> String
  1450. 1064.53 s [really-safe-money-gen] g = show . Amount.toMinimalQuantisations
  1451. 1064.54 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Amount/Codec.hs:46:11-86
  1452. 1064.54 s [really-safe-money-gen] @@ -43,15 +43,14 @@
  1453. 1064.54 s [really-safe-money-gen] codecViaString = bimapCodec f g stringCodec <?> "Amount"
  1454. 1064.54 s [really-safe-money-gen] where
  1455. 1064.54 s [really-safe-money-gen] f :: String -> Either String Amount
  1456. 1064.54 s [really-safe-money-gen] f s = case readMaybe s of
  1457. 1064.54 s [really-safe-money-gen] - Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1458. 1064.54 s [really-safe-money-gen] Just i ->
  1459. 1064.54 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1460. 1064.54 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1461. 1064.54 s [really-safe-money-gen] else
  1462. 1064.54 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1463. 1064.54 s [really-safe-money-gen] then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1464. 1064.54 s [really-safe-money-gen] else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1465. 1064.54 s [really-safe-money-gen] g :: Amount -> String
  1466. 1064.54 s [really-safe-money-gen] g = show . Amount.toMinimalQuantisations
  1467. 1064.54 s [really-safe-money-gen]
  1468. 1064.54 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Amount/Codec.hs:46:11-86
  1469. 1064.54 s [really-safe-money-gen] @@ -43,15 +43,8 @@
  1470. 1064.54 s [really-safe-money-gen] codecViaString = bimapCodec f g stringCodec <?> "Amount"
  1471. 1064.54 s [really-safe-money-gen] where
  1472. 1064.54 s [really-safe-money-gen] f :: String -> Either String Amount
  1473. 1064.54 s [really-safe-money-gen] f s = case readMaybe s of
  1474. 1064.54 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1475. 1064.54 s [really-safe-money-gen] - Just i ->
  1476. 1064.54 s [really-safe-money-gen] - if (i :: Integer) < toInteger (minBound :: Word64)
  1477. 1064.54 s [really-safe-money-gen] - then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1478. 1064.54 s [really-safe-money-gen] - else
  1479. 1064.54 s [really-safe-money-gen] - if (i :: Integer) > toInteger (maxBound :: Word64)
  1480. 1064.54 s [really-safe-money-gen] - then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1481. 1064.54 s [really-safe-money-gen] - else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1482. 1064.54 s [really-safe-money-gen] g :: Amount -> String
  1483. 1064.54 s [really-safe-money-gen] g = show . Amount.toMinimalQuantisations
  1484. 1064.54 s [really-safe-money-gen]
  1485. 1064.54 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Account/Codec.hs:79:11-24
  1486. 1064.54 s [really-safe-money-gen] @@ -76,6 +76,5 @@
  1487. 1064.54 s [really-safe-money-gen] <?> "Account"
  1488. 1064.54 s [really-safe-money-gen] where
  1489. 1064.54 s [really-safe-money-gen] f :: Integer -> Either String Account
  1490. 1064.54 s [really-safe-money-gen] f i = case Account.fromMinimalQuantisations i of
  1491. 1064.54 s [really-safe-money-gen] Nothing -> Left $ "Number did not fit into an account value: " <> show i
  1492. 1064.54 s [really-safe-money-gen] - Just a -> Right a
  1493. 1064.54 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Account/Codec.hs:51:33-76
  1494. 1064.54 s [really-safe-money-gen] @@ -48,7 +48,6 @@
  1495. 1064.54 s [really-safe-money-gen] where
  1496. 1064.54 s [really-safe-money-gen] f :: String -> Either String Account
  1497. 1064.54 s [really-safe-money-gen] f s = case readMaybe s >>= Account.fromMinimalQuantisations of
  1498. 1064.54 s [really-safe-money-gen] - Nothing -> Left $ unwords ["Could not read string as an Account:", s]
  1499. 1064.54 s [really-safe-money-gen] Just a -> Right a
  1500. 1064.54 s [really-safe-money-gen] g :: Account -> String
  1501. 1064.54 s [really-safe-money-gen] g = show . Account.toMinimalQuantisations
  1502. 1066.96 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Account/Codec.hs:79:11-24
  1503. 1066.96 s [really-safe-money-gen] @@ -76,6 +76,5 @@
  1504. 1067.04 s [really-safe-money-gen] <?> "Account"
  1505. 1067.04 s [really-safe-money-gen] where
  1506. 1067.04 s [really-safe-money-gen] f :: Integer -> Either String Account
  1507. 1067.04 s [really-safe-money-gen] f i = case Account.fromMinimalQuantisations i of
  1508. 1067.04 s [really-safe-money-gen] - Nothing -> Left $ "Number did not fit into an account value: " <> show i
  1509. 1067.04 s [really-safe-money-gen] Just a -> Right a
  1510. 1067.04 s [really-safe-money-gen] Testing mutation ListLit at src/Money/Account/Codec.hs:51:33-76
  1511. 1067.04 s [really-safe-money-gen] @@ -48,7 +48,6 @@
  1512. 1067.04 s [really-safe-money-gen] where
  1513. 1067.04 s [really-safe-money-gen] f :: String -> Either String Account
  1514. 1067.04 s [really-safe-money-gen] f s = case readMaybe s >>= Account.fromMinimalQuantisations of
  1515. 1067.04 s [really-safe-money-gen] - Nothing -> Left $ unwords ["Could not read string as an Account:", s]
  1516. 1067.04 s [really-safe-money-gen] Just a -> Right a
  1517. 1067.04 s [really-safe-money-gen] g :: Account -> String
  1518. 1067.04 s [really-safe-money-gen] g = show . Account.toMinimalQuantisations
  1519. 1067.04 s [really-safe-money-gen] Testing mutation Cmp at src/Money/Amount/Codec.hs:52:16-63
  1520. 1067.04 s [really-safe-money-gen] @@ -49,7 +49,7 @@
  1521. 1067.04 s [really-safe-money-gen] if (i :: Integer) < toInteger (minBound :: Word64)
  1522. 1067.04 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1523. 1067.04 s [really-safe-money-gen] else
  1524. 1067.04 s [really-safe-money-gen] - if (i :: Integer) > toInteger (maxBound :: Word64)
  1525. 1067.04 s [really-safe-money-gen] + if (i :: Integer) >= toInteger (maxBound :: Word64)
  1526. 1067.04 s [really-safe-money-gen] then Left $ unwords ["Number of minimal quantisations is too big:", show i]
  1527. 1067.04 s [really-safe-money-gen] else Right $ Amount.fromMinimalQuantisations (fromIntegral i :: Word64)
  1528. 1067.04 s [really-safe-money-gen] g :: Amount -> String
  1529. 1067.04 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:180:25-32
  1530. 1067.04 s [really-safe-money-gen] @@ -177,10 +177,9 @@
  1531. 1067.04 s [really-safe-money-gen] RoundNearest -> round
  1532. 1067.04 s [really-safe-money-gen] roundedResult :: Integer
  1533. 1067.04 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  1534. 1067.04 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  1535. 1067.04 s [really-safe-money-gen] - LT -> RoundedDown
  1536. 1067.04 s [really-safe-money-gen] EQ -> DidNotRound
  1537. 1067.04 s [really-safe-money-gen] GT -> RoundedUp
  1538. 1067.04 s [really-safe-money-gen] in (Account.fromMinimalQuantisations roundedResult, rounded)
  1539. 1067.04 s [really-safe-money-gen] )
  1540. 1067.04 s [really-safe-money-gen] . Prelude.sum
  1541. 1067.05 s [really-safe-money-gen] Testing mutation Negate at src/Money/MultiAmount.hs:106:12-28
  1542. 1067.05 s [really-safe-money-gen] @@ -103,7 +103,7 @@
  1543. 1067.05 s [really-safe-money-gen] Just a -> do
  1544. 1067.05 s [really-safe-money-gen] r <- Amount.add a amount
  1545. 1067.05 s [really-safe-money-gen] Just $
  1546. 1067.05 s [really-safe-money-gen] - if r == Amount.zero
  1547. 1067.05 s [really-safe-money-gen] + if not (r == Amount.zero)
  1548. 1067.05 s [really-safe-money-gen] then M.delete currency m
  1549. 1067.05 s [really-safe-money-gen] else M.insert currency r m
  1550. 1067.05 s [really-safe-money-gen]
  1551. 1067.05 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:174:25-38
  1552. 1067.05 s [really-safe-money-gen] @@ -171,10 +171,9 @@
  1553. 1067.05 s [really-safe-money-gen] fmap
  1554. 1067.05 s [really-safe-money-gen] ( ( \theoreticalResult ->
  1555. 1067.05 s [really-safe-money-gen] let rounder :: Rational -> Integer
  1556. 1067.05 s [really-safe-money-gen] rounder = case r of
  1557. 1067.05 s [really-safe-money-gen] RoundUp -> ceiling
  1558. 1067.05 s [really-safe-money-gen] - RoundDown -> floor
  1559. 1067.05 s [really-safe-money-gen] RoundNearest -> round
  1560. 1067.05 s [really-safe-money-gen] roundedResult :: Integer
  1561. 1067.05 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  1562. 1067.05 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  1563. 1067.05 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:115:23-37
  1564. 1067.05 s [really-safe-money-gen] @@ -112,14 +112,13 @@
  1565. 1067.05 s [really-safe-money-gen] addAccount m _ (Positive (Amount 0)) = Just m
  1566. 1067.05 s [really-safe-money-gen] addAccount m _ (Negative (Amount 0)) = Just m
  1567. 1067.05 s [really-safe-money-gen] addAccount (MultiAccount m) currency account =
  1568. 1067.05 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  1569. 1067.05 s [really-safe-money-gen] - Nothing -> Just $ M.insert currency account m
  1570. 1067.05 s [really-safe-money-gen] Just a -> do
  1571. 1067.05 s [really-safe-money-gen] r <- Account.add a account
  1572. 1067.05 s [really-safe-money-gen] Just $
  1573. 1067.05 s [really-safe-money-gen] if r == Account.zero
  1574. 1067.05 s [really-safe-money-gen] then M.delete currency m
  1575. 1067.05 s [really-safe-money-gen] else M.insert currency r m
  1576. 1067.05 s [really-safe-money-gen]
  1577. 1067.05 s [really-safe-money-gen] -- | Add an 'Account' to a 'MultiAccount'
  1578. 1067.05 s [really-safe-money-gen] subtractAccount :: (Ord currency) => MultiAccount currency -> currency -> Account -> Maybe (MultiAccount currency)
  1579. 1067.05 s [really-safe-money-gen] Testing mutation MaybeOp at src/Money/MultiAccount.hs:112:40-46
  1580. 1067.05 s [really-safe-money-gen] @@ -109,7 +109,7 @@
  1581. 1067.05 s [really-safe-money-gen]
  1582. 1067.05 s [really-safe-money-gen] -- | Add an 'Account' to a 'MultiAccount'
  1583. 1067.05 s [really-safe-money-gen] addAccount :: (Ord currency) => MultiAccount currency -> currency -> Account -> Maybe (MultiAccount currency)
  1584. 1067.05 s [really-safe-money-gen] -addAccount m _ (Positive (Amount 0)) = Just m
  1585. 1067.05 s [really-safe-money-gen] +addAccount m _ (Positive (Amount 0)) = Nothing
  1586. 1067.05 s [really-safe-money-gen] addAccount m _ (Negative (Amount 0)) = Just m
  1587. 1067.05 s [really-safe-money-gen] addAccount (MultiAccount m) currency account =
  1588. 1067.05 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  1589. 1067.05 s [really-safe-money-gen] Testing mutation ConstBool at src/Money/MultiAmount.hs:73:6-27
  1590. 1067.05 s [really-safe-money-gen] @@ -70,7 +70,7 @@
  1591. 1067.05 s [really-safe-money-gen]
  1592. 1067.05 s [really-safe-money-gen] fromAmount :: currency -> Amount -> MultiAmount currency
  1593. 1067.05 s [really-safe-money-gen] fromAmount currency amount =
  1594. 1067.05 s [really-safe-money-gen] - if amount == Amount.zero
  1595. 1067.05 s [really-safe-money-gen] + if False
  1596. 1067.06 s [really-safe-money-gen] then zero
  1597. 1067.06 s [really-safe-money-gen] else MultiAmount $ M.singleton currency amount
  1598. 1067.06 s [really-safe-money-gen]
  1599. 1067.06 s [really-safe-money-gen] Testing mutation RemoveCase at src/Numeric/DecimalLiteral/Codec.hs:39:11-24
  1600. 1067.06 s [really-safe-money-gen] @@ -36,6 +36,5 @@
  1601. 1067.06 s [really-safe-money-gen] codecViaString = bimapCodec f DecimalLiteral.toString stringCodec <?> "DecimalLiteral"
  1602. 1067.06 s [really-safe-money-gen] where
  1603. 1067.06 s [really-safe-money-gen] f :: String -> Either String DecimalLiteral
  1604. 1067.06 s [really-safe-money-gen] f s = case DecimalLiteral.fromString s of
  1605. 1067.06 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as a DecimalLiteral:", s]
  1606. 1067.06 s [really-safe-money-gen] - Just a -> Right a
  1607. 1067.06 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:174:25-38
  1608. 1067.06 s [really-safe-money-gen] @@ -171,10 +171,9 @@
  1609. 1067.06 s [really-safe-money-gen] fmap
  1610. 1067.06 s [really-safe-money-gen] ( ( \theoreticalResult ->
  1611. 1067.06 s [really-safe-money-gen] let rounder :: Rational -> Integer
  1612. 1067.06 s [really-safe-money-gen] rounder = case r of
  1613. 1067.06 s [really-safe-money-gen] - RoundUp -> ceiling
  1614. 1067.06 s [really-safe-money-gen] RoundDown -> floor
  1615. 1067.06 s [really-safe-money-gen] RoundNearest -> round
  1616. 1067.06 s [really-safe-money-gen] roundedResult :: Integer
  1617. 1067.06 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  1618. 1067.06 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  1619. 1067.06 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/AmountOf.hs:215:29-113
  1620. 1067.06 s [really-safe-money-gen] @@ -212,11 +212,10 @@
  1621. 1067.06 s [really-safe-money-gen]
  1622. 1067.06 s [really-safe-money-gen] -- | See 'Amount.distribute'
  1623. 1067.06 s [really-safe-money-gen] distribute :: AmountOf currency -> Word32 -> AmountDistributionOf currency
  1624. 1067.06 s [really-safe-money-gen] distribute (AmountOf a) f = case Amount.distribute a f of
  1625. 1067.06 s [really-safe-money-gen] DistributedIntoZeroChunks -> DistributedIntoZeroChunks
  1626. 1067.06 s [really-safe-money-gen] DistributedZero -> DistributedZero
  1627. 1067.06 s [really-safe-money-gen] - DistributedIntoEqualChunks w' a' -> DistributedIntoEqualChunks w' (fromAmount a')
  1628. 1067.06 s [really-safe-money-gen] DistributedIntoUnequalChunks w1 a1 w2 a2 -> DistributedIntoUnequalChunks w1 (fromAmount a1) w2 (fromAmount a2)
  1629. 1067.06 s [really-safe-money-gen]
  1630. 1067.06 s [really-safe-money-gen] type AmountDistributionOf (currency :: k) = Distribution (AmountOf currency)
  1631. 1067.06 s [really-safe-money-gen]
  1632. 1067.06 s [really-safe-money-gen] Testing mutation Negate at src/Money/Amount/Codec.hs:49:12-59
  1633. 1067.06 s [really-safe-money-gen] @@ -46,7 +46,7 @@
  1634. 1067.06 s [really-safe-money-gen] f s = case readMaybe s of
  1635. 1067.06 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Amount:", s]
  1636. 1067.06 s [really-safe-money-gen] Just i ->
  1637. 1067.06 s [really-safe-money-gen] - if (i :: Integer) < toInteger (minBound :: Word64)
  1638. 1067.06 s [really-safe-money-gen] + if not ((i :: Integer) < toInteger (minBound :: Word64))
  1639. 1067.06 s [really-safe-money-gen] then Left $ unwords ["Negative number of minimal quantisations:", show i]
  1640. 1067.06 s [really-safe-money-gen] else
  1641. 1067.06 s [really-safe-money-gen] if (i :: Integer) > toInteger (maxBound :: Word64)
  1642. 1067.07 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/AmountOf.hs:215:29-113
  1643. 1067.07 s [really-safe-money-gen] @@ -212,11 +212,10 @@
  1644. 1067.07 s [really-safe-money-gen]
  1645. 1067.07 s [really-safe-money-gen] -- | See 'Amount.distribute'
  1646. 1067.07 s [really-safe-money-gen] distribute :: AmountOf currency -> Word32 -> AmountDistributionOf currency
  1647. 1067.07 s [really-safe-money-gen] distribute (AmountOf a) f = case Amount.distribute a f of
  1648. 1067.07 s [really-safe-money-gen] DistributedIntoZeroChunks -> DistributedIntoZeroChunks
  1649. 1067.07 s [really-safe-money-gen] - DistributedZero -> DistributedZero
  1650. 1067.07 s [really-safe-money-gen] DistributedIntoEqualChunks w' a' -> DistributedIntoEqualChunks w' (fromAmount a')
  1651. 1067.07 s [really-safe-money-gen] DistributedIntoUnequalChunks w1 a1 w2 a2 -> DistributedIntoUnequalChunks w1 (fromAmount a1) w2 (fromAmount a2)
  1652. 1067.07 s [really-safe-money-gen]
  1653. 1067.07 s [really-safe-money-gen] type AmountDistributionOf (currency :: k) = Distribution (AmountOf currency)
  1654. 1067.07 s [really-safe-money-gen]
  1655. 1067.07 s [really-safe-money-gen] Testing mutation RemoveCase at src/Numeric/DecimalLiteral/Codec.hs:39:11-24
  1656. 1067.07 s [really-safe-money-gen] @@ -36,6 +36,5 @@
  1657. 1067.07 s [really-safe-money-gen] codecViaString = bimapCodec f DecimalLiteral.toString stringCodec <?> "DecimalLiteral"
  1658. 1067.07 s [really-safe-money-gen] where
  1659. 1067.07 s [really-safe-money-gen] f :: String -> Either String DecimalLiteral
  1660. 1067.07 s [really-safe-money-gen] f s = case DecimalLiteral.fromString s of
  1661. 1067.07 s [really-safe-money-gen] - Nothing -> Left $ unwords ["Could not read string as a DecimalLiteral:", s]
  1662. 1067.07 s [really-safe-money-gen] Just a -> Right a
  1663. 1067.07 s [really-safe-money-gen] Testing mutation ListLit at src/Numeric/DecimalLiteral/Codec.hs:40:33-82
  1664. 1067.07 s [really-safe-money-gen] @@ -37,5 +37,4 @@
  1665. 1067.07 s [really-safe-money-gen] where
  1666. 1067.07 s [really-safe-money-gen] f :: String -> Either String DecimalLiteral
  1667. 1067.07 s [really-safe-money-gen] f s = case DecimalLiteral.fromString s of
  1668. 1067.07 s [really-safe-money-gen] - Nothing -> Left $ unwords ["Could not read string as a DecimalLiteral:", s]
  1669. 1067.07 s [really-safe-money-gen] Just a -> Right a
  1670. 1067.07 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Account/Codec.hs:50:11-24
  1671. 1067.07 s [really-safe-money-gen] @@ -47,9 +47,8 @@
  1672. 1090.61 s [really-safe-money-gen] codecViaStrinKilled: 426
  1673. 1090.61 s [really-safe-money-gen] (of which timed out: 0)
  1674. 1090.61 s [really-safe-money-gen] Survived: 58
  1675. 1090.63 s [really-safe-money-gen] Uncovered: 40
  1676. 1090.63 s [really-safe-money-gen]
  1677. 1090.63 s [really-safe-money-gen] Surviving mutations:
  1678. 1090.63 s [really-safe-money-gen]
  1679. 1090.63 s [really-safe-money-gen] ListLit at src/Money/MultiAccount.hs:66:7-8
  1680. 1090.63 s [really-safe-money-gen] @@ -63,11 +63,10 @@
  1681. 1090.63 s [really-safe-money-gen] instance (Validity currency, Show currency, Ord currency) => Validity (MultiAccount currency) where
  1682. 1090.63 s [really-safe-money-gen] validate ma@(MultiAccount m) =
  1683. 1090.63 s [really-safe-money-gen] mconcat
  1684. 1090.63 s [really-safe-money-gen] - [ genericValidate ma,
  1685. 1090.63 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1686. 1090.63 s [really-safe-money-gen] declare "The account is not zero" $
  1687. 1090.63 s [really-safe-money-gen] a /= Account.zero
  1688. 1090.63 s [really-safe-money-gen] ]
  1689. 1090.63 s [really-safe-money-gen]
  1690. 1090.63 s [really-safe-money-gen] -- TODO no empty currencies
  1691. 1090.63 s [really-safe-money-gen]
  1692. 1090.63 s [really-safe-money-gen]
  1693. 1090.63 s [really-safe-money-gen] ListLit at src/Money/MultiAccount.hs:66:7-8
  1694. 1090.63 s [really-safe-money-gen] @@ -63,11 +63,7 @@
  1695. 1090.63 s [really-safe-money-gen] instance (Validity currency, Show currency, Ord currency) => Validity (MultiAccount currency) where
  1696. 1090.63 s [really-safe-money-gen] validate ma@(MultiAccount m) =
  1697. 1090.63 s [really-safe-money-gen] mconcat
  1698. 1090.63 s [really-safe-money-gen] - [ genericValidate ma,
  1699. 1090.63 s [really-safe-money-gen] - decorateMap m $ \_ a ->
  1700. 1090.64 s [really-safe-money-gen] - declare "The account is not zero" $
  1701. 1090.64 s [really-safe-money-gen] - a /= Account.zero
  1702. 1090.64 s [really-safe-money-gen] ]
  1703. 1090.64 s [really-safe-money-gen]
  1704. 1090.64 s [really-safe-money-gen] -- TODO no empty currencies
  1705. 1090.64 s [really-safe-money-gen]
  1706. 1090.64 s [really-safe-money-gen]
  1707. 1090.64 s [really-safe-money-gen] ConstBool at src/Money/MultiAccount.hs:69:13-30
  1708. 1090.64 s [really-safe-money-gen] @@ -66,7 +66,7 @@
  1709. 1090.64 s [really-safe-money-gen] [ genericValidate ma,
  1710. 1090.64 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1711. 1090.64 s [really-safe-money-gen] declare "The account is not zero" $
  1712. 1090.64 s [really-safe-money-gen] - a /= Account.zero
  1713. 1090.64 s [really-safe-money-gen] + True
  1714. 1090.64 s [really-safe-money-gen] ]
  1715. 1090.64 s [really-safe-money-gen]
  1716. 1090.64 s [really-safe-money-gen] -- TODO no empty currencies
  1717. 1090.64 s [really-safe-money-gen]
  1718. 1090.64 s [really-safe-money-gen] ConstBool at src/Money/MultiAccount.hs:78:6-28
  1719. 1090.64 s [really-safe-money-gen] @@ -75,7 +75,7 @@
  1720. 1090.64 s [really-safe-money-gen]
  1721. 1090.64 s [really-safe-money-gen] fromAccount :: currency -> Account -> MultiAccount currency
  1722. 1090.64 s [really-safe-money-gen] fromAccount currency amount =
  1723. 1090.64 s [really-safe-money-gen] - if amount == Account.zero
  1724. 1090.64 s [really-safe-money-gen] + if True
  1725. 1090.64 s [really-safe-money-gen] then zero
  1726. 1090.64 s [really-safe-money-gen] else MultiAccount $ M.singleton currency amount
  1727. 1090.64 s [really-safe-money-gen]
  1728. 1090.64 s [really-safe-money-gen]
  1729. 1090.64 s [really-safe-money-gen] MaybeOp at src/Money/MultiAccount.hs:113:40-46
  1730. 1090.64 s [really-safe-money-gen] @@ -110,7 +110,7 @@
  1731. 1090.64 s [really-safe-money-gen] -- | Add an 'Account' to a 'MultiAccount'
  1732. 1090.64 s [really-safe-money-gen] addAccount :: (Ord currency) => MultiAccount currency -> currency -> Account -> Maybe (MultiAccount currency)
  1733. 1090.64 s [really-safe-money-gen] addAccount m _ (Positive (Amount 0)) = Just m
  1734. 1090.64 s [really-safe-money-gen] -addAccount m _ (Negative (Amount 0)) = Just m
  1735. 1090.64 s [really-safe-money-gen] +addAccount m _ (Negative (Amount 0)) = Nothing
  1736. 1090.64 s [really-safe-money-gen] addAccount (MultiAccount m) currency account =
  1737. 1090.64 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  1738. 1090.64 s [really-safe-money-gen] Nothing -> Just $ M.insert currency account m
  1739. 1090.64 s [really-safe-money-gen]
  1740. 1090.64 s [really-safe-money-gen] MaybeOp at src/Money/MultiAccount.hs:127:45-51
  1741. 1090.64 s [really-safe-money-gen] @@ -124,7 +124,7 @@
  1742. 1090.64 s [really-safe-money-gen] -- | Add an 'Account' to a 'MultiAccount'
  1743. 1090.64 s [really-safe-money-gen] subtractAccount :: (Ord currency) => MultiAccount currency -> currency -> Account -> Maybe (MultiAccount currency)
  1744. 1090.64 s [really-safe-money-gen] subtractAccount m _ (Positive (Amount 0)) = Just m
  1745. 1090.64 s [really-safe-money-gen] -subtractAccount m _ (Negative (Amount 0)) = Just m
  1746. 1090.64 s [really-safe-money-gen] +subtractAccount m _ (Negative (Amount 0)) = Nothing
  1747. 1090.64 s [really-safe-money-gen] subtractAccount (MultiAccount m) currency account =
  1748. 1090.64 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  1749. 1090.64 s [really-safe-money-gen] Nothing -> Just $ M.insert currency (Account.negate account) m
  1750. 1090.64 s [really-safe-money-gen]
  1751. 1090.64 s [really-safe-money-gen] MaybeOp at src/Money/MultiAccount.hs:126:45-51
  1752. 1090.64 s [really-safe-money-gen] @@ -123,7 +123,7 @@
  1753. 1090.64 s [really-safe-money-gen]
  1754. 1090.64 s [really-safe-money-gen] -- | Add an 'Account' to a 'MultiAccount'
  1755. 1090.64 s [really-safe-money-gen] subtractAccount :: (Ord currency) => MultiAccount currency -> currency -> Account -> Maybe (MultiAccount currency)
  1756. 1090.64 s [really-safe-money-gen] -subtractAccount m _ (Positive (Amount 0)) = Just m
  1757. 1090.64 s [really-safe-money-gen] +subtractAccount m _ (Positive (Amount 0)) = Nothing
  1758. 1090.64 s [really-safe-money-gen] subtractAccount m _ (Negative (Amount 0)) = Just m
  1759. 1090.64 s [really-safe-money-gen] subtractAccount (MultiAccount m) currency account =
  1760. 1090.64 s [really-safe-money-gen] fmap MultiAccount $ case M.lookup currency m of
  1761. 1090.64 s [really-safe-money-gen]
  1762. 1090.64 s [really-safe-money-gen] ListLit at src/Money/MultiAmount.hs:63:7-8
  1763. 1090.65 s [really-safe-money-gen] @@ -60,11 +60,10 @@
  1764. 1090.65 s [really-safe-money-gen] instance (Validity currency, Show currency, Ord currency) => Validity (MultiAmount currency) where
  1765. 1090.65 s [really-safe-money-gen] validate ma@(MultiAmount m) =
  1766. 1090.65 s [really-safe-money-gen] mconcat
  1767. 1090.65 s [really-safe-money-gen] - [ genericValidate ma,
  1768. 1090.65 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1769. 1090.65 s [really-safe-money-gen] declare "The amount is not zero" $
  1770. 1090.65 s [really-safe-money-gen] a /= Amount.zero
  1771. 1090.65 s [really-safe-money-gen] ]
  1772. 1090.65 s [really-safe-money-gen]
  1773. 1090.65 s [really-safe-money-gen] instance (NFData currency) => NFData (MultiAmount currency)
  1774. 1090.65 s [really-safe-money-gen]
  1775. 1090.65 s [really-safe-money-gen]
  1776. 1090.65 s [really-safe-money-gen] ListLit at src/Money/MultiAmount.hs:63:7-8
  1777. 1090.65 s [really-safe-money-gen] @@ -60,11 +60,7 @@
  1778. 1090.65 s [really-safe-money-gen] instance (Validity currency, Show currency, Ord currency) => Validity (MultiAmount currency) where
  1779. 1090.65 s [really-safe-money-gen] validate ma@(MultiAmount m) =
  1780. 1090.65 s [really-safe-money-gen] mconcat
  1781. 1090.65 s [really-safe-money-gen] - [ genericValidate ma,
  1782. 1090.65 s [really-safe-money-gen] - decorateMap m $ \_ a ->
  1783. 1090.65 s [really-safe-money-gen] - declare "The amount is not zero" $
  1784. 1090.65 s [really-safe-money-gen] - a /= Amount.zero
  1785. 1090.65 s [really-safe-money-gen] ]
  1786. 1090.65 s [really-safe-money-gen]
  1787. 1090.65 s [really-safe-money-gen] instance (NFData currency) => NFData (MultiAmount currency)
  1788. 1090.65 s [really-safe-money-gen]
  1789. 1090.65 s [really-safe-money-gen]
  1790. 1090.65 s [really-safe-money-gen] ConstBool at src/Money/MultiAmount.hs:66:13-29
  1791. 1090.65 s [really-safe-money-gen] @@ -63,7 +63,7 @@
  1792. 1090.65 s [really-safe-money-gen] [ genericValidate ma,
  1793. 1090.65 s [really-safe-money-gen] decorateMap m $ \_ a ->
  1794. 1090.65 s [really-safe-money-gen] declare "The amount is not zero" $
  1795. 1090.65 s [really-safe-money-gen] - a /= Amount.zero
  1796. 1090.65 s [really-safe-money-gen] + True
  1797. 1090.65 s [really-safe-money-gen] ]
  1798. 1090.65 s [really-safe-money-gen]
  1799. 1090.65 s [really-safe-money-gen] instance (NFData currency) => NFData (MultiAmount currency)
  1800. 1090.65 s [really-safe-money-gen]
  1801. 1090.65 s [really-safe-money-gen] ConstBool at src/Money/MultiAmount.hs:106:12-28
  1802. 1090.65 s [really-safe-money-gen] @@ -103,7 +103,7 @@
  1803. 1090.65 s [really-safe-money-gen] Just a -> do
  1804. 1090.65 s [really-safe-money-gen] r <- Amount.add a amount
  1805. 1090.65 s [really-safe-money-gen] Just $
  1806. 1090.65 s [really-safe-money-gen] - if r == Amount.zero
  1807. 1090.65 s [really-safe-money-gen] + if False
  1808. 1090.65 s [really-safe-money-gen] then M.delete currency m
  1809. 1090.65 s [really-safe-money-gen] else M.insert currency r m
  1810. 1090.65 s [really-safe-money-gen]
  1811. 1090.65 s [really-safe-money-gen]
  1812. 1090.65 s [really-safe-money-gen] Negate at src/Money/MultiAmount.hs:119:12-28
  1813. 1090.65 s [really-safe-money-gen] @@ -116,7 +116,7 @@
  1814. 1090.65 s [really-safe-money-gen] Just a -> do
  1815. 1090.65 s [really-safe-money-gen] r <- Amount.subtract a amount
  1816. 1090.65 s [really-safe-money-gen] Just $
  1817. 1090.65 s [really-safe-money-gen] - if r == Amount.zero
  1818. 1090.65 s [really-safe-money-gen] + if not (r == Amount.zero)
  1819. 1090.65 s [really-safe-money-gen] then M.delete currency m
  1820. 1090.65 s [really-safe-money-gen] else M.insert currency r m
  1821. 1090.65 s [really-safe-money-gen]
  1822. 1090.65 s [really-safe-money-gen]
  1823. 1090.65 s [really-safe-money-gen] ConstBool at src/Money/MultiAmount.hs:119:12-28
  1824. 1090.65 s [really-safe-money-gen] @@ -116,7 +116,7 @@
  1825. 1090.65 s [really-safe-money-gen] Just a -> do
  1826. 1090.65 s [really-safe-money-gen] r <- Amount.subtract a amount
  1827. 1090.65 s [really-safe-money-gen] Just $
  1828. 1090.65 s [really-safe-money-gen] - if r == Amount.zero
  1829. 1090.65 s [really-safe-money-gen] + if False
  1830. 1090.65 s [really-safe-money-gen] then M.delete currency m
  1831. 1090.65 s [really-safe-money-gen] else M.insert currency r m
  1832. 1090.65 s [really-safe-money-gen]
  1833. 1090.65 s [really-safe-money-gen]
  1834. 1090.65 s [really-safe-money-gen] ConstBool at src/Money/MultiAmount.hs:119:12-28
  1835. 1090.65 s [really-safe-money-gen] @@ -116,7 +116,7 @@
  1836. 1090.65 s [really-safe-money-gen] Just a -> do
  1837. 1090.65 s [really-safe-money-gen] r <- Amount.subtract a amount
  1838. 1090.65 s [really-safe-money-gen] Just $
  1839. 1090.66 s [really-safe-money-gen] - if r == Amount.zero
  1840. 1090.66 s [really-safe-money-gen] + if True
  1841. 1090.66 s [really-safe-money-gen] then M.delete currency m
  1842. 1090.66 s [really-safe-money-gen] else M.insert currency r m
  1843. 1090.66 s [really-safe-money-gen]
  1844. 1090.66 s [really-safe-money-gen]
  1845. 1090.66 s [really-safe-money-gen] MaybeOp at src/Money/MultiAmount.hs:112:33-39
  1846. 1090.66 s [really-safe-money-gen] @@ -109,7 +109,7 @@
  1847. 1090.66 s [really-safe-money-gen]
  1848. 1090.66 s [really-safe-money-gen] -- | Subtract an 'Amount' from a 'MultiAmount'
  1849. 1090.66 s [really-safe-money-gen] subtractAmount :: (Ord currency) => MultiAmount currency -> currency -> Amount -> Maybe (MultiAmount currency)
  1850. 1090.66 s [really-safe-money-gen] -subtractAmount m _ (Amount 0) = Just m
  1851. 1090.66 s [really-safe-money-gen] +subtractAmount m _ (Amount 0) = Nothing
  1852. 1090.66 s [really-safe-money-gen] subtractAmount (MultiAmount m) currency amount =
  1853. 1090.66 s [really-safe-money-gen] fmap MultiAmount $ case M.lookup currency m of
  1854. 1090.66 s [really-safe-money-gen] Nothing -> Nothing -- Can't go below zero
  1855. 1090.66 s [really-safe-money-gen]
  1856. 1090.66 s [really-safe-money-gen] Cmp at src/Money/MultiAmount.hs:168:20-45
  1857. 1090.66 s [really-safe-money-gen] @@ -165,7 +165,7 @@
  1858. 1090.66 s [really-safe-money-gen] maxBoundN :: Natural
  1859. 1090.66 s [really-safe-money-gen] maxBoundN = fromIntegral (maxBound :: Word64)
  1860. 1090.66 s [really-safe-money-gen] actualResult =
  1861. 1090.66 s [really-safe-money-gen] - if roundedResult > maxBoundN
  1862. 1090.66 s [really-safe-money-gen] + if roundedResult >= maxBoundN
  1863. 1090.66 s [really-safe-money-gen] then Nothing
  1864. 1090.66 s [really-safe-money-gen] else Just (fromIntegral roundedResult)
  1865. 1090.66 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  1866. 1090.66 s [really-safe-money-gen]
  1867. 1090.66 s [really-safe-money-gen] ListLit at src/Money/Amount.hs:603:7-8
  1868. 1090.66 s [really-safe-money-gen] @@ -600,13 +600,12 @@
  1869. 1090.66 s [really-safe-money-gen] instance (Validity amount, Ord amount) => Validity (Distribution amount) where
  1870. 1090.66 s [really-safe-money-gen] validate ad =
  1871. 1090.66 s [really-safe-money-gen] mconcat
  1872. 1090.66 s [really-safe-money-gen] - [ genericValidate ad,
  1873. 1090.66 s [really-safe-money-gen] case ad of
  1874. 1090.66 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  1875. 1090.66 s [really-safe-money-gen] declare "The larger chunks are larger" $
  1876. 1090.66 s [really-safe-money-gen] a1 > a2
  1877. 1090.66 s [really-safe-money-gen] _ -> valid
  1878. 1090.66 s [really-safe-money-gen] ]
  1879. 1090.66 s [really-safe-money-gen]
  1880. 1090.66 s [really-safe-money-gen] instance (NFData amount) => NFData (Distribution amount)
  1881. 1090.66 s [really-safe-money-gen]
  1882. 1090.66 s [really-safe-money-gen]
  1883. 1090.66 s [really-safe-money-gen] ListLit at src/Money/Amount.hs:603:7-8
  1884. 1090.66 s [really-safe-money-gen] @@ -600,13 +600,7 @@
  1885. 1090.66 s [really-safe-money-gen] instance (Validity amount, Ord amount) => Validity (Distribution amount) where
  1886. 1090.66 s [really-safe-money-gen] validate ad =
  1887. 1090.66 s [really-safe-money-gen] mconcat
  1888. 1090.66 s [really-safe-money-gen] - [ genericValidate ad,
  1889. 1090.66 s [really-safe-money-gen] - case ad of
  1890. 1090.66 s [really-safe-money-gen] - DistributedIntoUnequalChunks _ a1 _ a2 ->
  1891. 1090.66 s [really-safe-money-gen] - declare "The larger chunks are larger" $
  1892. 1090.66 s [really-safe-money-gen] - a1 > a2
  1893. 1090.66 s [really-safe-money-gen] - _ -> valid
  1894. 1090.66 s [really-safe-money-gen] ]
  1895. 1090.66 s [really-safe-money-gen]
  1896. 1090.66 s [really-safe-money-gen] instance (NFData amount) => NFData (Distribution amount)
  1897. 1090.66 s [really-safe-money-gen]
  1898. 1090.66 s [really-safe-money-gen]
  1899. 1090.66 s [really-safe-money-gen] RemoveCase at src/Money/Amount.hs:604:9-21
  1900. 1090.66 s [really-safe-money-gen] @@ -601,11 +601,8 @@
  1901. 1090.66 s [really-safe-money-gen] validate ad =
  1902. 1090.66 s [really-safe-money-gen] mconcat
  1903. 1090.66 s [really-safe-money-gen] [ genericValidate ad,
  1904. 1090.66 s [really-safe-money-gen] case ad of
  1905. 1090.66 s [really-safe-money-gen] - DistributedIntoUnequalChunks _ a1 _ a2 ->
  1906. 1090.66 s [really-safe-money-gen] - declare "The larger chunks are larger" $
  1907. 1090.66 s [really-safe-money-gen] - a1 > a2
  1908. 1090.66 s [really-safe-money-gen] _ -> valid
  1909. 1090.66 s [really-safe-money-gen] ]
  1910. 1090.66 s [really-safe-money-gen]
  1911. 1090.67 s [really-safe-money-gen] instance (NFData amount) => NFData (Distribution amount)
  1912. 1090.67 s [really-safe-money-gen]
  1913. 1090.67 s [really-safe-money-gen] ConstBool at src/Money/Amount.hs:607:15-22
  1914. 1090.67 s [really-safe-money-gen] @@ -604,7 +604,7 @@
  1915. 1090.67 s [really-safe-money-gen] case ad of
  1916. 1090.67 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  1917. 1090.67 s [really-safe-money-gen] declare "The larger chunks are larger" $
  1918. 1090.67 s [really-safe-money-gen] - a1 > a2
  1919. 1090.67 s [really-safe-money-gen] + True
  1920. 1090.67 s [really-safe-money-gen] _ -> valid
  1921. 1090.67 s [really-safe-money-gen] ]
  1922. 1090.67 s [really-safe-money-gen]
  1923. 1090.67 s [really-safe-money-gen]
  1924. 1090.67 s [really-safe-money-gen] Cmp at src/Money/Amount.hs:607:15-22
  1925. 1090.67 s [really-safe-money-gen] @@ -604,7 +604,7 @@
  1926. 1090.67 s [really-safe-money-gen] case ad of
  1927. 1090.67 s [really-safe-money-gen] DistributedIntoUnequalChunks _ a1 _ a2 ->
  1928. 1090.67 s [really-safe-money-gen] declare "The larger chunks are larger" $
  1929. 1090.67 s [really-safe-money-gen] - a1 > a2
  1930. 1090.67 s [really-safe-money-gen] + a1 >= a2
  1931. 1090.67 s [really-safe-money-gen] _ -> valid
  1932. 1090.67 s [really-safe-money-gen] ]
  1933. 1090.67 s [really-safe-money-gen]
  1934. 1090.67 s [really-safe-money-gen]
  1935. 1090.67 s [really-safe-money-gen] MaybeOp at src/Money/Amount.hs:661:19-28
  1936. 1090.67 s [really-safe-money-gen] @@ -658,7 +658,7 @@
  1937. 1090.67 s [really-safe-money-gen] -- | The amount and the real rate that was used, considering the 'Rounding'
  1938. 1090.67 s [really-safe-money-gen] (Maybe Amount, Ratio Natural)
  1939. 1090.67 s [really-safe-money-gen] fraction _ (Amount 0) f = (Just zero, f)
  1940. 1090.67 s [really-safe-money-gen] -fraction _ _ 0 = (Just zero, 0)
  1941. 1090.67 s [really-safe-money-gen] +fraction _ _ 0 = (Nothing, 0)
  1942. 1090.67 s [really-safe-money-gen] fraction r (Amount a) f =
  1943. 1090.67 s [really-safe-money-gen] let amountAsRatio :: Ratio Natural
  1944. 1090.67 s [really-safe-money-gen] amountAsRatio = (fromIntegral :: Word64 -> Ratio Natural) a
  1945. 1090.67 s [really-safe-money-gen]
  1946. 1090.67 s [really-safe-money-gen] Cmp at src/Money/Amount.hs:495:10-23
  1947. 1090.67 s [really-safe-money-gen] @@ -492,7 +492,7 @@
  1948. 1090.67 s [really-safe-money-gen] maxBoundI = fromIntegral (maxBound :: Word64)
  1949. 1090.67 s [really-safe-money-gen] r :: Integer
  1950. 1090.67 s [really-safe-money-gen] r = foldl' (\acc a -> (toInteger :: Word64 -> Integer) (toMinimalQuantisations a) + acc) 0 l
  1951. 1090.67 s [really-safe-money-gen] - in if r > maxBoundI
  1952. 1090.67 s [really-safe-money-gen] + in if r >= maxBoundI
  1953. 1090.67 s [really-safe-money-gen] then Nothing
  1954. 1090.67 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  1955. 1090.67 s [really-safe-money-gen]
  1956. 1090.67 s [really-safe-money-gen]
  1957. 1090.67 s [really-safe-money-gen] Cmp at src/Money/Amount.hs:341:26-91
  1958. 1090.67 s [really-safe-money-gen] @@ -338,7 +338,7 @@
  1959. 1090.67 s [really-safe-money-gen] floored = (floor :: Double -> Natural) resultDouble
  1960. 1090.67 s [really-safe-money-gen] in if ceiled == floored
  1961. 1090.67 s [really-safe-money-gen] then
  1962. 1090.67 s [really-safe-money-gen] - if ceiled > (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  1963. 1090.67 s [really-safe-money-gen] + if ceiled >= (fromIntegral :: Word64 -> Natural) (maxBound :: Word64)
  1964. 1090.67 s [really-safe-money-gen] then Nothing
  1965. 1090.67 s [really-safe-money-gen] else Just $ Amount (fromIntegral ceiled)
  1966. 1090.67 s [really-safe-money-gen] else Nothing
  1967. 1090.67 s [really-safe-money-gen]
  1968. 1090.67 s [really-safe-money-gen] ConstBool at src/Money/Amount.hs:332:14-40
  1969. 1090.67 s [really-safe-money-gen] @@ -329,7 +329,7 @@
  1970. 1090.67 s [really-safe-money-gen] | otherwise =
  1971. 1090.67 s [really-safe-money-gen] -- Shortcut for numbers that are way too big anyway
  1972. 1090.67 s [really-safe-money-gen] -- so that we don't have to compute the according 'Natural' values.
  1973. 1090.67 s [really-safe-money-gen] - if exponent resultDouble > 65
  1974. 1090.67 s [really-safe-money-gen] + if False
  1975. 1090.67 s [really-safe-money-gen] then Nothing
  1976. 1090.67 s [really-safe-money-gen] else
  1977. 1090.67 s [really-safe-money-gen] let ceiled :: Natural
  1978. 1090.67 s [really-safe-money-gen]
  1979. 1090.67 s [really-safe-money-gen] Cmp at src/Money/Amount.hs:332:14-40
  1980. 1090.67 s [really-safe-money-gen] @@ -329,7 +329,7 @@
  1981. 1090.68 s [really-safe-money-gen] | otherwise =
  1982. 1090.68 s [really-safe-money-gen] -- Shortcut for numbers that are way too big anyway
  1983. 1090.68 s [really-safe-money-gen] -- so that we don't have to compute the according 'Natural' values.
  1984. 1090.68 s [really-safe-money-gen] - if exponent resultDouble > 65
  1985. 1090.68 s [really-safe-money-gen] + if exponent resultDouble >= 65
  1986. 1090.68 s [really-safe-money-gen] then Nothing
  1987. 1090.68 s [really-safe-money-gen] else
  1988. 1090.68 s [really-safe-money-gen] let ceiled :: Natural
  1989. 1090.68 s [really-safe-money-gen]
  1990. 1090.68 s [really-safe-money-gen] MaybeOp at src/Money/Amount.hs:520:14-66
  1991. 1090.68 s [really-safe-money-gen] @@ -517,7 +517,7 @@
  1992. 1090.68 s [really-safe-money-gen] r = i1 - i2
  1993. 1090.68 s [really-safe-money-gen] in if r < 0
  1994. 1090.68 s [really-safe-money-gen] then Nothing
  1995. 1090.68 s [really-safe-money-gen] - else Just (Amount ((fromInteger :: Integer -> Word64) r))
  1996. 1090.68 s [really-safe-money-gen] + else Nothing
  1997. 1090.68 s [really-safe-money-gen]
  1998. 1090.68 s [really-safe-money-gen] -- | Multiply an amount of money by an integer scalar
  1999. 1090.68 s [really-safe-money-gen] --
  2000. 1090.68 s [really-safe-money-gen]
  2001. 1090.68 s [really-safe-money-gen] ConstBool at src/Money/Amount.hs:518:10-15
  2002. 1090.68 s [really-safe-money-gen] @@ -515,7 +515,7 @@
  2003. 1090.68 s [really-safe-money-gen] i2 = (fromIntegral :: Word64 -> Integer) a2
  2004. 1090.68 s [really-safe-money-gen] r :: Integer
  2005. 1090.68 s [really-safe-money-gen] r = i1 - i2
  2006. 1090.68 s [really-safe-money-gen] - in if r < 0
  2007. 1090.68 s [really-safe-money-gen] + in if True
  2008. 1090.68 s [really-safe-money-gen] then Nothing
  2009. 1090.68 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  2010. 1090.68 s [really-safe-money-gen]
  2011. 1090.68 s [really-safe-money-gen]
  2012. 1090.68 s [really-safe-money-gen] Cmp at src/Money/Amount.hs:518:10-15
  2013. 1090.68 s [really-safe-money-gen] @@ -515,7 +515,7 @@
  2014. 1090.68 s [really-safe-money-gen] i2 = (fromIntegral :: Word64 -> Integer) a2
  2015. 1090.68 s [really-safe-money-gen] r :: Integer
  2016. 1090.68 s [really-safe-money-gen] r = i1 - i2
  2017. 1090.68 s [really-safe-money-gen] - in if r < 0
  2018. 1090.68 s [really-safe-money-gen] + in if r <= 0
  2019. 1090.68 s [really-safe-money-gen] then Nothing
  2020. 1090.68 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  2021. 1090.68 s [really-safe-money-gen]
  2022. 1090.68 s [really-safe-money-gen]
  2023. 1090.68 s [really-safe-money-gen] IntLit at src/Money/Amount.hs:518:14-15
  2024. 1090.68 s [really-safe-money-gen] @@ -515,7 +515,7 @@
  2025. 1090.68 s [really-safe-money-gen] i2 = (fromIntegral :: Word64 -> Integer) a2
  2026. 1090.68 s [really-safe-money-gen] r :: Integer
  2027. 1090.68 s [really-safe-money-gen] r = i1 - i2
  2028. 1090.68 s [really-safe-money-gen] - in if r < 0
  2029. 1090.68 s [really-safe-money-gen] + in if r < 1
  2030. 1090.68 s [really-safe-money-gen] then Nothing
  2031. 1090.68 s [really-safe-money-gen] else Just (Amount ((fromInteger :: Integer -> Word64) r))
  2032. 1090.68 s [really-safe-money-gen]
  2033. 1090.68 s [really-safe-money-gen]
  2034. 1090.68 s [really-safe-money-gen] ListLit at src/Money/QuantisationFactor.hs:39:7-8
  2035. 1090.68 s [really-safe-money-gen] @@ -36,9 +36,8 @@
  2036. 1090.68 s [really-safe-money-gen] instance Validity QuantisationFactor where
  2037. 1090.68 s [really-safe-money-gen] validate qf@(QuantisationFactor w) =
  2038. 1090.68 s [really-safe-money-gen] mconcat
  2039. 1090.68 s [really-safe-money-gen] - [ genericValidate qf,
  2040. 1090.68 s [really-safe-money-gen] declare "The quantisation factor is not zero" $ w /= 0
  2041. 1090.68 s [really-safe-money-gen] ]
  2042. 1090.68 s [really-safe-money-gen]
  2043. 1090.69 s [really-safe-money-gen] instance NFData QuantisationFactor
  2044. 1090.69 s [really-safe-money-gen]
  2045. 1090.69 s [really-safe-money-gen]
  2046. 1090.69 s [really-safe-money-gen] ListLit at src/Money/Quantisg = bimapCodec f g stringCodec <?> "Account"
  2047. 1090.69 s [really-safe-money-gen] where
  2048. 1090.69 s [really-safe-money-gen] f :: String -> Either String Account
  2049. 1090.69 s [really-safe-money-gen] f s = case readMaybe s >>= Account.fromMinimalQuantisations of
  2050. 1090.69 s [really-safe-money-gen] Nothing -> Left $ unwords ["Could not read string as an Account:", s]
  2051. 1090.69 s [really-safe-money-gen] - Just a -> Right a
  2052. 1090.69 s [really-safe-money-gen] g :: Account -> String
  2053. 1090.69 s [really-safe-money-gen] g = show . Account.toMinimalQuantisations
  2054. 1090.69 s [really-safe-money-gen]
  2055. 1090.69 s [really-safe-money-gen] Testing mutation ListLit at src/Numeric/DecimalLiteral/Codec.hs:40:33-82
  2056. 1090.69 s [really-safe-money-gen] @@ -37,5 +37,4 @@
  2057. 1090.69 s [really-safe-money-gen] where
  2058. 1090.69 s [really-safe-money-gen] f :: String -> Either String DecimalLiteral
  2059. 1090.69 s [really-safe-money-gen] f s = case DecimalLiteral.fromString s of
  2060. 1090.69 s [really-safe-money-gen] - Nothing -> Left $ unwords ["Could not read string as a DecimalLiteral:", s]
  2061. 1090.69 s [really-safe-money-gen] Just a -> Right a
  2062. 1090.69 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/Account/Codec.hs:50:11-24
  2063. 1090.69 s [really-safe-money-gen] @@ -47,9 +47,8 @@
  2064. 1090.69 s [really-safe-money-gen] codecViaString = bimapCodec f g stringCodec <?> "Account"
  2065. 1090.69 s [really-safe-money-gen] where
  2066. 1090.69 s [really-safe-money-gen] f :: String -> Either String Account
  2067. 1090.69 s [really-safe-money-gen] f s = case readMaybe s >>= Account.fromMinimalQuantisations of
  2068. 1090.69 s [really-safe-money-gen] - Nothing -> Left $ unwords ["Could not read string as an Account:", s]
  2069. 1090.69 s [really-safe-money-gen] Just a -> Right a
  2070. 1090.69 s [really-safe-money-gen] g :: Account -> String
  2071. 1090.69 s [really-safe-money-gen] g = show . Account.toMinimalQuantisations
  2072. 1090.69 s [really-safe-money-gen]
  2073. 1090.69 s [really-safe-money-gen] Testing mutation RemoveCase at src/Money/MultiAccount.hs:180:25-32
  2074. 1090.69 s [really-safe-money-gen] @@ -177,10 +177,9 @@
  2075. 1090.69 s [really-safe-money-gen] RoundNearest -> round
  2076. 1090.69 s [really-safe-money-gen] roundedResult :: Integer
  2077. 1090.69 s [really-safe-money-gen] roundedResult = rounder theoreticalResult
  2078. 1090.69 s [really-safe-money-gen] rounded = case compare (fromIntegral roundedResult) theoreticalResult of
  2079. 1090.69 s [really-safe-money-gen] LT -> RoundedDown
  2080. 1090.69 s [really-safe-money-gen] - EQ -> DidNotRound
  2081. 1090.69 s [really-safe-money-gen] GT -> RoundedUp
  2082. 1090.69 s [really-safe-money-gen] in (Account.fromMinimalQuantisations roundedResult, rounded)
  2083. 1090.69 s [really-safe-money-gen] )
  2084. 1090.69 s [really-safe-money-gen] . Prelude.sum
  2085. 1090.69 s [really-safe-money-gen] ationFactor.hs:39:7-8
  2086. 1090.69 s [really-safe-money-gen] @@ -36,9 +36,7 @@
  2087. 1090.69 s [really-safe-money-gen] instance Validity QuantisationFactor where
  2088. 1090.69 s [really-safe-money-gen] validate qf@(QuantisationFactor w) =
  2089. 1090.69 s [really-safe-money-gen] mconcat
  2090. 1090.69 s [really-safe-money-gen] - [ genericValidate qf,
  2091. 1090.69 s [really-safe-money-gen] - declare "The quantisation factor is not zero" $ w /= 0
  2092. 1090.69 s [really-safe-money-gen] ]
  2093. 1090.69 s [really-safe-money-gen]
  2094. 1090.69 s [really-safe-money-gen] instance NFData QuantisationFactor
  2095. 1090.69 s [really-safe-money-gen]
  2096. 1090.69 s [really-safe-money-gen]
  2097. 1090.69 s [really-safe-money-gen] ConstBool at src/Money/QuantisationFactor.hs:40:57-63
  2098. 1090.69 s [really-safe-money-gen] @@ -37,7 +37,7 @@
  2099. 1090.69 s [really-safe-money-gen] validate qf@(QuantisationFactor w) =
  2100. 1090.69 s [really-safe-money-gen] mconcat
  2101. 1090.69 s [really-safe-money-gen] [ genericValidate qf,
  2102. 1090.69 s [really-safe-money-gen] - declare "The quantisation factor is not zero" $ w /= 0
  2103. 1090.69 s [really-safe-money-gen] + declare "The quantisation factor is not zero" $ True
  2104. 1090.69 s [really-safe-money-gen] ]
  2105. 1090.69 s [really-safe-money-gen]
  2106. 1090.69 s [really-safe-money-gen] instance NFData QuantisationFactor
  2107. 1090.69 s [really-safe-money-gen]
  2108. 1090.69 s [really-safe-money-gen] ConstBool at src/Money/ConversionRate.hs:38:41-57
  2109. 1090.69 s [really-safe-money-gen] @@ -35,7 +35,7 @@
  2110. 1090.69 s [really-safe-money-gen] validate cr@(ConversionRate r) =
  2111. 1090.69 s [really-safe-money-gen] mconcat
  2112. 1090.69 s [really-safe-money-gen] [ genericValidate cr,
  2113. 1090.69 s [really-safe-money-gen] - declare "The rate is nonzero" $ numerator r /= 0
  2114. 1090.69 s [really-safe-money-gen] + declare "The rate is nonzero" $ True
  2115. 1090.69 s [really-safe-money-gen] ]
  2116. 1090.69 s [really-safe-money-gen]
  2117. 1090.70 s [really-safe-money-gen] instance NFData ConversionRate
  2118. 1090.70 s [really-safe-money-gen]
  2119. 1090.70 s [really-safe-money-gen] IntLit at src/Money/ConversionRate.hs:109:27-28
  2120. 1090.70 s [really-safe-money-gen] @@ -106,7 +106,7 @@
  2121. 1090.70 s [really-safe-money-gen]
  2122. 1090.70 s [really-safe-money-gen] -- | One-to-one conversion rate
  2123. 1090.70 s [really-safe-money-gen] oneToOne :: ConversionRate
  2124. 1090.70 s [really-safe-money-gen] -oneToOne = ConversionRate 1
  2125. 1090.70 s [really-safe-money-gen] +oneToOne = ConversionRate 0
  2126. 1090.70 s [really-safe-money-gen]
  2127. 1090.70 s [really-safe-money-gen] -- | Invert a 'ConversionRate', to convert in the other direction.
  2128. 1090.70 s [really-safe-money-gen] --
  2129. 1090.70 s [really-safe-money-gen]
  2130. 1090.70 s [really-safe-money-gen] Arith at src/Money/ConversionRate.hs:127:70-79
  2131. 1090.70 s [really-safe-money-gen] @@ -124,7 +124,7 @@
  2132. 1090.70 s [really-safe-money-gen] -- >>> compose (ConversionRate (2 % 1)) (ConversionRate (1 % 2))
  2133. 1090.70 s [really-safe-money-gen] -- ConversionRate {unConversionRate = 1 % 1}
  2134. 1090.70 s [really-safe-money-gen] compose :: ConversionRate -> ConversionRate -> ConversionRate
  2135. 1090.70 s [really-safe-money-gen] -compose (ConversionRate cr1) (ConversionRate cr2) = ConversionRate $ cr1 * cr2
  2136. 1090.70 s [really-safe-money-gen] +compose (ConversionRate cr1) (ConversionRate cr2) = ConversionRate $ cr1 + cr2
  2137. 1090.70 s [really-safe-money-gen]
  2138. 1090.70 s [really-safe-money-gen] -- | The factor to multiply by when converting currencies.
  2139. 1090.70 s [really-safe-money-gen] conversionFactor :: QuantisationFactor -> ConversionRate -> QuantisationFactor -> Ratio Natural
  2140. 1090.70 s [really-safe-money-gen]
  2141. 1090.70 s [really-safe-money-gen] RemoveCase at src/Money/AccountOf.hs:180:30-115
  2142. 1090.70 s [really-safe-money-gen] @@ -177,11 +177,10 @@
  2143. 1090.70 s [really-safe-money-gen]
  2144. 1090.70 s [really-safe-money-gen] -- | See 'Account.distribute'
  2145. 1090.70 s [really-safe-money-gen] distribute :: AccountOf currency -> Word16 -> AccountDistributionOf currency
  2146. 1090.70 s [really-safe-money-gen] distribute (AccountOf a) w = case Account.distribute a w of
  2147. 1090.70 s [really-safe-money-gen] DistributedIntoZeroChunks -> DistributedIntoZeroChunks
  2148. 1090.70 s [really-safe-money-gen] DistributedZero -> DistributedZero
  2149. 1090.70 s [really-safe-money-gen] - DistributedIntoEqualChunks w' a' -> DistributedIntoEqualChunks w' (fromAccount a')
  2150. 1090.70 s [really-safe-money-gen] DistributedIntoUnequalChunks w1 a1 w2 a2 -> DistributedIntoUnequalChunks w1 (fromAccount a1) w2 (fromAccount a2)
  2151. 1090.70 s [really-safe-money-gen]
  2152. 1090.70 s [really-safe-money-gen] -- | The result of 'distribute'
  2153. 1090.70 s [really-safe-money-gen] type AccountDistributionOf (currency :: k) = Distribution (AccountOf currency)
  2154. 1090.70 s [really-safe-money-gen]
  2155. 1090.70 s [really-safe-money-gen] RemoveCase at src/Numeric/DecimalLiteral.hs:112:17-21
  2156. 1090.70 s [really-safe-money-gen] @@ -109,9 +109,8 @@
  2157. 1090.70 s [really-safe-money-gen]
  2158. 1090.70 s [really-safe-money-gen] -- | Like 'fromString' but in a 'MonadFail'
  2159. 1090.70 s [really-safe-money-gen] fromStringM :: (MonadFail m) => String -> m DecimalLiteral
  2160. 1090.70 s [really-safe-money-gen] fromStringM s = case Numeric.DecimalLiteral.fromString s of
  2161. 1090.70 s [really-safe-money-gen] Nothing -> fail $ "Failed to parse decimal literal from: " <> show s
  2162. 1090.70 s [really-safe-money-gen] - Just dl -> pure dl
  2163. 1090.70 s [really-safe-money-gen]
  2164. 1090.70 s [really-safe-money-gen] decimalLiteralP :: ReadP DecimalLiteral
  2165. 1090.70 s [really-safe-money-gen] decimalLiteralP = do
  2166. 1090.70 s [really-safe-money-gen]
  2167. 1090.70 s [really-safe-money-gen] RemoveCase at src/Numeric/DecimalLiteral.hs:287:38-40
  2168. 1090.70 s [really-safe-money-gen] @@ -284,9 +284,8 @@
  2169. 1090.70 s [really-safe-money-gen] -- >>> toRatio (DecimalLiteral (Just False) 3 1)
  2170. 1090.70 s [really-safe-money-gen] -- Nothing
  2171. 1090.70 s [really-safe-money-gen] toRatio :: DecimalLiteral -> Maybe (Ratio Natural)
  2172. 1090.70 s [really-safe-money-gen] toRatio (DecimalLiteral mSign m e) = case mSign of
  2173. 1090.70 s [really-safe-money-gen] - Just False -> Nothing
  2174. 1090.70 s [really-safe-money-gen] _ -> Just $ fromIntegral m / (10 ^ e)
  2175. 1090.70 s [really-safe-money-gen]
  2176. 1090.70 s [really-safe-money-gen] -- | Construct a 'DecimalLiteral' from a 'Word'
  2177. 1090.70 s [really-safe-money-gen] fromWord :: Word -> DecimalLiteral
  2178. 1090.70 s [really-safe-money-gen]
  2179. 1090.70 s [really-safe-money-gen] IntLit at src/Numeric/DecimalLiteral.hs:289:33-35
  2180. 1090.70 s [really-safe-money-gen] @@ -286,7 +286,7 @@
  2181. 1090.70 s [really-safe-money-gen] toRatio :: DecimalLiteral -> Maybe (Ratio Natural)
  2182. 1090.70 s [really-safe-money-gen] toRatio (DecimalLiteral mSign m e) = case mSign of
  2183. 1090.70 s [really-safe-money-gen] Just False -> Nothing
  2184. 1090.70 s [really-safe-money-gen] - _ -> Just $ fromIntegral m / (10 ^ e)
  2185. 1090.70 s [really-safe-money-gen] + _ -> Just $ fromIntegral m / (1 ^ e)
  2186. 1090.70 s [really-safe-money-gen]
  2187. 1090.70 s [really-safe-money-gen] -- | Construct a 'DecimalLiteral' from a 'Word'
  2188. 1090.70 s [really-safe-money-gen] fromWord :: Word -> DecimalLiteral
  2189. 1090.70 s [really-safe-money-gen]
  2190. 1090.70 s [really-safe-money-gen] RemoveAction at src/Numeric/DecimalLiteral.hs:299:3-47
  2191. 1090.70 s [really-safe-money-gen] @@ -296,7 +296,6 @@
  2192. 1090.70 s [really-safe-money-gen] toWord :: DecimalLiteral -> Maybe Word
  2193. 1090.70 s [really-safe-money-gen] toWord dl = do
  2194. 1090.70 s [really-safe-money-gen] n <- toNatural dl
  2195. 1090.70 s [really-safe-money-gen] - guard $ n <= fromIntegral (maxBound :: Word)
  2196. 1090.70 s [really-safe-money-gen] pure $ fromIntegral n
  2197. 1090.71 s [really-safe-money-gen]
  2198. 1090.71 s [really-safe-money-gen] -- | Construct a 'DecimalLiteral' from a 'Natural'
  2199. 1090.71 s [really-safe-money-gen]
  2200. 1090.71 s [really-safe-money-gen] ConstBool at src/Numeric/DecimalLiteral.hs:299:11-47
  2201. 1090.71 s [really-safe-money-gen] @@ -296,7 +296,7 @@
  2202. 1090.71 s [really-safe-money-gen] toWord :: DecimalLiteral -> Maybe Word
  2203. 1090.71 s [really-safe-money-gen] toWord dl = do
  2204. 1090.71 s [really-safe-money-gen] n <- toNatural dl
  2205. 1090.71 s [really-safe-money-gen] - guard $ n <= fromIntegral (maxBound :: Word)
  2206. 1090.71 s [really-safe-money-gen] + guard $ True
  2207. 1090.71 s [really-safe-money-gen] pure $ fromIntegral n
  2208. 1090.71 s [really-safe-money-gen]
  2209. 1090.71 s [really-safe-money-gen] -- | Construct a 'DecimalLiteral' from a 'Natural'
  2210. 1090.71 s [really-safe-money-gen]
  2211. 1090.71 s [really-safe-money-gen] RemoveAction at src/Numeric/DecimalLiteral.hs:332:3-46
  2212. 1090.71 s [really-safe-money-gen] @@ -329,7 +329,6 @@
  2213. 1090.71 s [really-safe-money-gen] toInt :: DecimalLiteral -> Maybe Int
  2214. 1090.71 s [really-safe-money-gen] toInt dl = do
  2215. 1090.71 s [really-safe-money-gen] n <- toInteger dl
  2216. 1090.71 s [really-safe-money-gen] - guard $ n <= fromIntegral (maxBound :: Int)
  2217. 1090.71 s [really-safe-money-gen] guard $ n >= fromIntegral (minBound :: Int)
  2218. 1090.71 s [really-safe-money-gen] pure $ fromIntegral n
  2219. 1090.71 s [really-safe-money-gen]
  2220. 1090.71 s [really-safe-money-gen]
  2221. 1090.71 s [really-safe-money-gen] RemoveAction at src/Numeric/DecimalLiteral.hs:333:3-46
  2222. 1090.71 s [really-safe-money-gen] @@ -330,7 +330,6 @@
  2223. 1090.71 s [really-safe-money-gen] toInt dl = do
  2224. 1090.71 s [really-safe-money-gen] n <- toInteger dl
  2225. 1090.71 s [really-safe-money-gen] guard $ n <= fromIntegral (maxBound :: Int)
  2226. 1090.71 s [really-safe-money-gen] - guard $ n >= fromIntegral (minBound :: Int)
  2227. 1090.71 s [really-safe-money-gen] pure $ fromIntegral n
  2228. 1090.71 s [really-safe-money-gen]
  2229. 1090.71 s [really-safe-money-gen] numSign :: (Ord a, Num a) => a -> Maybe Bool
  2230. 1090.71 s [really-safe-money-gen]
  2231. 1090.71 s [really-safe-money-gen] ConstBool at src/Numeric/DecimalLiteral.hs:333:11-46
  2232. 1090.71 s [really-safe-money-gen] @@ -330,7 +330,7 @@
  2233. 1090.71 s [really-safe-money-gen] toInt dl = do
  2234. 1090.71 s [really-safe-money-gen] n <- toInteger dl
  2235. 1090.71 s [really-safe-money-gen] guard $ n <= fromIntegral (maxBound :: Int)
  2236. 1090.71 s [really-safe-money-gen] - guard $ n >= fromIntegral (minBound :: Int)
  2237. 1090.71 s [really-safe-money-gen] + guard $ True
  2238. 1090.71 s [really-safe-money-gen] pure $ fromIntegral n
  2239. 1090.71 s [really-safe-money-gen]
  2240. 1090.71 s [really-safe-money-gen] numSign :: (Ord a, Num a) => a -> Maybe Bool
  2241. 1090.71 s [really-safe-money-gen]
  2242. 1090.71 s [really-safe-money-gen] ConstBool at src/Numeric/DecimalLiteral.hs:332:11-46
  2243. 1090.71 s [really-safe-money-gen] @@ -329,7 +329,7 @@
  2244. 1090.71 s [really-safe-money-gen] toInt :: DecimalLiteral -> Maybe Int
  2245. 1090.71 s [really-safe-money-gen] toInt dl = do
  2246. 1090.71 s [really-safe-money-gen] n <- toInteger dl
  2247. 1090.71 s [really-safe-money-gen] - guard $ n <= fromIntegral (maxBound :: Int)
  2248. 1090.71 s [really-safe-money-gen] + guard $ True
  2249. 1090.71 s [really-safe-money-gen] guard $ n >= fromIntegral (minBound :: Int)
  2250. 1090.71 s [really-safe-money-gen] pure $ fromIntegral n
  2251. 1090.71 s [really-safe-money-gen]
  2252. 1090.71 s [really-safe-money-gen]
  2253. 1090.71 s [really-safe-money-gen] Cmp at src/Numeric/DecimalLiteral.hs:332:11-46
  2254. 1090.71 s [really-safe-money-gen] @@ -329,7 +329,7 @@
  2255. 1090.71 s [really-safe-money-gen] toInt :: DecimalLiteral -> Maybe Int
  2256. 1090.72 s [really-safe-money-gen] toInt dl = do
  2257. 1090.72 s [really-safe-money-gen] n <- toInteger dl
  2258. 1090.72 s [really-safe-money-gen] - guard $ n <= fromIntegral (maxBound :: Int)
  2259. 1090.72 s [really-safe-money-gen] + guard $ n < fromIntegral (maxBound :: Int)
  2260. 1090.72 s [really-safe-money-gen] guard $ n >= fromIntegral (minBound :: Int)
  2261. 1090.72 s [really-safe-money-gen] pure $ fromIntegral n
  2262. 1090.72 s [really-safe-money-gen]
  2263. 1090.72 s [really-safe-money-gen]
  2264. 1090.72 s [really-safe-money-gen] Cmp at src/Numeric/DecimalLiteral.hs:337:16-22
  2265. 1090.72 s [really-safe-money-gen] @@ -334,7 +334,7 @@
  2266. 1090.72 s [really-safe-money-gen] pure $ fromIntegral n
  2267. 1090.72 s [really-safe-money-gen]
  2268. 1090.72 s [really-safe-money-gen] numSign :: (Ord a, Num a) => a -> Maybe Bool
  2269. 1090.72 s [really-safe-money-gen] -numSign a = if a >= 0 then Nothing else Just False
  2270. 1090.72 s [really-safe-money-gen] +numSign a = if a > 0 then Nothing else Just False
  2271. 1090.72 s [really-safe-money-gen]
  2272. 1090.72 s [really-safe-money-gen] signSignum :: (Num a) => Maybe Bool -> (a -> a)
  2273. 1090.72 s [really-safe-money-gen] signSignum = \case
  2274. 1090.72 s [really-safe-money-gen]
  2275. 1090.72 s [really-safe-money-gen] IntLit at src/Numeric/DecimalLiteral.hs:337:21-22
  2276. 1090.72 s [really-safe-money-gen] @@ -334,7 +334,7 @@
  2277. 1090.72 s [really-safe-money-gen] pure $ fromIntegral n
  2278. 1090.72 s [really-safe-money-gen]
  2279. 1090.72 s [really-safe-money-gen] numSign :: (Ord a, Num a) => a -> Maybe Bool
  2280. 1090.72 s [really-safe-money-gen] -numSign a = if a >= 0 then Nothing else Just False
  2281. 1090.72 s [really-safe-money-gen] +numSign a = if a >= 1 then Nothing else Just False
  2282. 1090.72 s [really-safe-money-gen]
  2283. 1090.72 s [really-safe-money-gen] signSignum :: (Num a) => Maybe Bool -> (a -> a)
  2284. 1090.72 s [really-safe-money-gen] signSignum = \case
  2285. 1090.72 s [really-safe-money-gen]
  2286. 1090.72 s [really-safe-money-gen] Cmp at src/Money/Account.hs:131:20-26
  2287. 1090.72 s [really-safe-money-gen] @@ -128,7 +128,7 @@
  2288. 1090.72 s [really-safe-money-gen] amount :: Amount
  2289. 1090.72 s [really-safe-money-gen] amount = Amount.fromMinimalQuantisations w
  2290. 1090.72 s [really-safe-money-gen] in Just $
  2291. 1090.72 s [really-safe-money-gen] - if i >= 0
  2292. 1090.73 s [really-safe-money-gen] + if i > 0
  2293. 1090.73 s [really-safe-money-gen] then Positive amount
  2294. 1090.73 s [really-safe-money-gen] else Negative amount
  2295. 1090.73 s [really-safe-money-gen]
  2296. 1090.73 s [really-safe-money-gen]
  2297. 1090.73 s [really-safe-money-gen] IntLit at src/Money/Account.hs:131:25-26
  2298. 1090.73 s [really-safe-money-gen] @@ -128,7 +128,7 @@
  2299. 1090.73 s [really-safe-money-gen] amount :: Amount
  2300. 1090.73 s [really-safe-money-gen] amount = Amount.fromMinimalQuantisations w
  2301. 1090.73 s [really-safe-money-gen] in Just $
  2302. 1090.73 s [really-safe-money-gen] - if i >= 0
  2303. 1090.73 s [really-safe-money-gen] + if i >= 1
  2304. 1090.73 s [really-safe-money-gen] then Positive amount
  2305. 1090.73 s [really-safe-money-gen] else Negative amount
  2306. 1090.73 s [really-safe-money-gen]
  2307. 1090.73 s [really-safe-money-gen]
  2308. 1090.73 s [really-safe-money-gen] ConstBool at src/Money/Account.hs:123:10-23
  2309. 1090.73 s [really-safe-money-gen] @@ -120,7 +120,7 @@
  2310. 1090.73 s [really-safe-money-gen] maxBoundI = (toInteger :: Word64 -> Integer) (maxBound :: Word64)
  2311. 1090.73 s [really-safe-money-gen] a :: Integer
  2312. 1090.73 s [really-safe-money-gen] a = (Prelude.abs :: Integer -> Integer) i
  2313. 1090.73 s [really-safe-money-gen] - in if a > maxBoundI
  2314. 1090.73 s [really-safe-money-gen] + in if False
  2315. 1090.73 s [really-safe-money-gen] then Nothing
  2316. 1090.73 s [really-safe-money-gen] else
  2317. 1090.73 s [really-safe-money-gen] let w :: Word64
  2318. 1090.73 s [really-safe-money-gen]
  2319. 1090.73 s [really-safe-money-gen] Cmp at src/Money/Account.hs:197:14-20
  2320. 1090.73 s [really-safe-money-gen] @@ -194,7 +194,7 @@
  2321. 1090.73 s [really-safe-money-gen] fromDouble :: QuantisationFactor -> Double -> Maybe Account
  2322. 1090.73 s [really-safe-money-gen] fromDouble quantisationFactor d =
  2323. 1090.73 s [really-safe-money-gen] let d' = Prelude.abs d
  2324. 1090.73 s [really-safe-money-gen] - f = if d >= 0 then Positive else Negative
  2325. 1090.73 s [really-safe-money-gen] + f = if d > 0 then Positive else Negative
  2326. 1090.73 s [really-safe-money-gen] in f <$> Amount.fromDouble quantisationFactor d'
  2327. 1090.73 s [really-safe-money-gen]
  2328. 1090.73 s [really-safe-money-gen] -- | Turn an amount of money into a 'Rational'.
  2329. 1090.73 s [really-safe-money-gen]
  2330. 1090.74 s [really-safe-money-gen] Cmp at src/Money/Account.hs:503:10-16
  2331. 1090.74 s [really-safe-money-gen] @@ -500,7 +500,7 @@
  2332. 1090.74 s [really-safe-money-gen] RoundNearest -> RoundNearest
  2333. 1090.74 s [really-safe-money-gen] (ma, ar) = fractionRatio ro account af
  2334. 1090.74 s [really-safe-money-gen] r = (realToFrac :: Ratio Natural -> Rational) ar
  2335. 1090.74 s [really-safe-money-gen] - in if f >= 0
  2336. 1090.74 s [really-safe-money-gen] + in if f > 0
  2337. 1090.74 s [really-safe-money-gen] then (ma, r)
  2338. 1090.74 s [really-safe-money-gen] else (negate <$> ma, -r)
  2339. 1090.74 s [really-safe-money-gen]
  2340. 1090.74 s [really-safe-money-gen]
  2341. 1090.74 s [really-safe-money-gen] Cmp at src/Money/Account.hs:495:12-18
  2342. 1090.74 s [really-safe-money-gen] @@ -492,7 +492,7 @@
  2343. 1090.74 s [really-safe-money-gen] fraction rounding account f =
  2344. 1090.74 s [really-safe-money-gen] let af = (realToFrac :: Rational -> Ratio Natural) ((Prelude.abs :: Rational -> Rational) f)
  2345. 1090.74 s [really-safe-money-gen] ro =
  2346. 1090.74 s [really-safe-money-gen] - if f >= 0
  2347. 1090.74 s [really-safe-money-gen] + if f > 0
  2348. 1090.74 s [really-safe-money-gen] then rounding
  2349. 1090.74 s [really-safe-money-gen] else case rounding of
  2350. 1090.74 s [really-safe-money-gen] RoundUp -> RoundDown
  2351. 1090.74 s [really-safe-money-gen]
  2352. 1090.74 s [really-safe-money-gen] MaybeOp at src/Money/Account.hs:523:16-25
  2353. 1090.74 s [really-safe-money-gen] @@ -520,7 +520,7 @@
  2354. 1090.74 s [really-safe-money-gen] (amount, actualFraction) = Amount.fraction ro aa af
  2355. 1090.74 s [really-safe-money-gen] func :: Maybe Amount -> Ratio Natural -> (Maybe Account, Ratio Natural)
  2356. 1090.74 s [really-safe-money-gen] func ma r = case compare account zero of
  2357. 1090.74 s [really-safe-money-gen] - EQ -> (Just zero, r)
  2358. 1090.74 s [really-safe-money-gen] + EQ -> (Nothing, r)
  2359. 1090.74 s [really-safe-money-gen] GT -> (Positive <$> ma, r)
  2360. 1090.74 s [really-safe-money-gen] LT -> (Negative <$> ma, r)
  2361. 1090.74 s [really-safe-money-gen] in func amount actualFraction
  2362. 1090.74 s [really-safe-money-gen]
  2363. 1090.74 s [really-safe-money-gen] Cmp at src/Money/Account.hs:455:14-23
  2364. 1090.74 s [really-safe-money-gen] @@ -452,7 +452,7 @@
  2365. 1090.74 s [really-safe-money-gen] then DistributedIntoEqualChunks numberOfChunks (Positive chunk)
  2366. 1090.74 s [really-safe-money-gen] else DistributedIntoEqualChunks numberOfChunks (Negative chunk)
  2367. 1090.74 s [really-safe-money-gen] DistributedIntoUnequalChunks numberOfLargerChunks largerChunk numberOfSmallerChunks smallerChunk ->
  2368. 1090.74 s [really-safe-money-gen] - if a >= zero
  2369. 1090.74 s [really-safe-money-gen] + if a > zero
  2370. 1090.75 s [really-safe-money-gen] then DistributedIntoUnequalChunks numberOfLargerChunks (Positive largerChunk) numberOfSmallerChunks (Positive smallerChunk)
  2371. 1090.75 s [really-safe-money-gen] else DistributedIntoUnequalChunks numberOfSmallerChunks (Negative smallerChunk) numberOfLargerChunks (Negative largerChunk)
  2372. 1090.75 s [really-safe-money-gen]
  2373. 1090.75 s [really-safe-money-gen]
  2374. 1090.75 s [really-safe-money-gen] Cmp at src/Money/Account.hs:451:14-23
  2375. 1090.75 s [really-safe-money-gen] @@ -448,7 +448,7 @@
  2376. 1090.75 s [really-safe-money-gen] DistributedIntoZeroChunks -> DistributedIntoZeroChunks
  2377. 1090.75 s [really-safe-money-gen] DistributedZero -> DistributedZero
  2378. 1090.75 s [really-safe-money-gen] DistributedIntoEqualChunks numberOfChunks chunk ->
  2379. 1090.75 s [really-safe-money-gen] - if a >= zero
  2380. 1090.75 s [really-safe-money-gen] + if a > zero
  2381. 1090.75 s [really-safe-money-gen] then DistributedIntoEqualChunks numberOfChunks (Positive chunk)
  2382. 1090.75 s [really-safe-money-gen] else DistributedIntoEqualChunks numberOfChunks (Negative chunk)
  2383. 1090.75 s [really-safe-money-gen] DistributedIntoUnequalChunks numberOfLargerChunks largerChunk numberOfSmallerChunks smallerChunk ->
  2384. 1090.75 s [really-safe-money-gen] checkPhase completed in 16 minutes 58 seconds
  2385. 1090.75 s [really-safe-money-gen] Phase: haddockPhase
  2386. 1091.40 s [really-safe-money-gen] Preprocessing library for really-safe-money-gen-0.0.0.0...
  2387. 1091.40 s [really-safe-money-gen] Running Haddock on library for really-safe-money-gen-0.0.0.0...
  2388. 1091.41 s [really-safe-money-gen] Warning: The documentation for the following packages are not installed. No
  2389. 1091.41 s [really-safe-money-gen] links will be generated to these packages: really-safe-money-0.0.0.0
  2390. 1092.18 s [really-safe-money-gen] [ 1 of 13] Compiling Money.Amount.Gen ( src/Money/Amount/Gen.hs, nothing )
  2391. 1092.70 s [really-safe-money-gen] [ 2 of 13] Compiling Money.Account.Gen ( src/Money/Account/Gen.hs, nothing )
  2392. 1092.74 s [really-safe-money-gen] [ 3 of 13] Compiling Money.AccountOf.Gen ( src/Money/AccountOf/Gen.hs, nothing )
  2393. 1092.77 s [really-safe-money-gen] [ 4 of 13] Compiling Money.AmountOf.Gen ( src/Money/AmountOf/Gen.hs, nothing )
  2394. 1092.79 s [really-safe-money-gen] [ 5 of 13] Compiling Money.ConversionRate.Gen ( src/Money/ConversionRate/Gen.hs, nothing )
  2395. 1092.85 s [really-safe-money-gen] [ 6 of 13] Compiling Money.ConversionRateOf.Gen ( src/Money/ConversionRateOf/Gen.hs, nothing )
  2396. 1092.88 s [really-safe-money-gen] [ 7 of 13] Compiling Money.QuantisationFactor.Gen ( src/Money/QuantisationFactor/Gen.hs, nothing )
  2397. 1092.90 s [really-safe-money-gen] [ 8 of 13] Compiling Money.Currency.Gen ( src/Money/Currency/Gen.hs, nothing )
  2398. 1092.92 s [really-safe-money-gen] [ 9 of 13] Compiling Money.MultiAmount.Gen ( src/Money/MultiAmount/Gen.hs, nothing )
  2399. 1092.98 s [really-safe-money-gen] [10 of 13] Compiling Money.MultiAccount.Gen ( src/Money/MultiAccount/Gen.hs, nothing )
  2400. 1093.01 s [really-safe-money-gen] [11 of 13] Compiling Money.Gen ( src/Money/Gen.hs, nothing )
  2401. 1093.02 s [really-safe-money-gen] [12 of 13] Compiling Numeric.DecimalLiteral.Gen ( src/Numeric/DecimalLiteral/Gen.hs, nothing )
  2402. 1093.05 s [really-safe-money-gen] [13 of 13] Compiling Paths_really_safe_money_gen ( dist/build/autogen/Paths_really_safe_money_gen.hs, nothing )
  2403. 1093.14 s [really-safe-money-gen] Haddock coverage:
  2404. 1093.14 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.Amount.Gen'
  2405. 1093.14 s [really-safe-money-gen] Missing documentation for:
  2406. 1093.14 s [really-safe-money-gen] Module header
  2407. 1093.14 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.Account.Gen'
  2408. 1093.14 s [really-safe-money-gen] Missing documentation for:
  2409. 1093.14 s [really-safe-money-gen] Module header
  2410. 1093.14 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.AccountOf.Gen'
  2411. 1093.14 s [really-safe-money-gen] Missing documentation for:
  2412. 1093.14 s [really-safe-money-gen] Module header
  2413. 1093.14 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.AmountOf.Gen'
  2414. 1093.14 s [really-safe-money-gen] Missing documentation for:
  2415. 1093.14 s [really-safe-money-gen] Module header
  2416. 1093.14 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.ConversionRate.Gen'
  2417. 1093.14 s [really-safe-money-gen] Missing documentation for:
  2418. 1093.14 s [really-safe-money-gen] Module header
  2419. 1093.14 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.ConversionRateOf.Gen'
  2420. 1093.14 s [really-safe-money-gen] Missing documentation for:
  2421. 1093.15 s [really-safe-money-gen] Module header
  2422. 1093.15 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.QuantisationFactor.Gen'
  2423. 1093.15 s [really-safe-money-gen] Missing documentation for:
  2424. 1093.15 s [really-safe-money-gen] Module header
  2425. 1093.15 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.Currency.Gen'
  2426. 1093.15 s [really-safe-money-gen] Missing documentation for:
  2427. 1093.15 s [really-safe-money-gen] Module header
  2428. 1093.15 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.MultiAmount.Gen'
  2429. 1093.15 s [really-safe-money-gen] Missing documentation for:
  2430. 1093.15 s [really-safe-money-gen] Module header
  2431. 1093.15 s [really-safe-money-gen] 0% ( 0 / 1) in 'Money.MultiAccount.Gen'
  2432. 1093.15 s [really-safe-money-gen] Missing documentation for:
  2433. 1093.15 s [really-safe-money-gen] Module header
  2434. 1093.15 s [really-safe-money-gen] Warning: Money.Gen: Could not find documentation for exported module: Money.Gen
  2435. 1093.15 s [really-safe-money-gen] 90% ( 10 / 11) in 'Money.Gen'
  2436. 1093.15 s [really-safe-money-gen] Missing documentation for:
  2437. 1093.15 s [really-safe-money-gen] Module header
  2438. 1093.15 s [really-safe-money-gen] 0% ( 0 / 2) in 'Numeric.DecimalLiteral.Gen'
  2439. 1093.15 s [really-safe-money-gen] Missing documentation for:
  2440. 1093.15 s [really-safe-money-gen] Module header
  2441. 1093.15 s [really-safe-money-gen] shrinkSign (src/Numeric/DecimalLiteral/Gen.hs:16)
  2442. 1093.52 s [really-safe-money-gen] Warning: Money.Amount.Gen: could not find link destinations for:
  2443. 1093.52 s [really-safe-money-gen] - Money.Amount.Amount
  2444. 1093.52 s [really-safe-money-gen] - Money.Amount.Distribution
  2445. 1093.52 s [really-safe-money-gen] - Money.Amount.Rounding
  2446. 1093.52 s [really-safe-money-gen] Warning: Money.Account.Gen: could not find link destinations for:
  2447. 1093.52 s [really-safe-money-gen] - Money.Account.Account
  2448. 1093.52 s [really-safe-money-gen] Warning: Money.AccountOf.Gen: could not find link destinations for:
  2449. 1093.52 s [really-safe-money-gen] - Money.AccountOf.AccountOf
  2450. 1093.52 s [really-safe-money-gen] Warning: Money.AmountOf.Gen: could not find link destinations for:
  2451. 1093.52 s [really-safe-money-gen] - Money.AmountOf.AmountOf
  2452. 1093.52 s [really-safe-money-gen] Warning: Money.ConversionRate.Gen: could not find link destinations for:
  2453. 1093.52 s [really-safe-money-gen] - Money.ConversionRate.ConversionRate
  2454. 1093.52 s [really-safe-money-gen] Warning: Money.ConversionRateOf.Gen: could not find link destinations for:
  2455. 1093.52 s [really-safe-money-gen] - Money.ConversionRateOf.ConversionRateOf
  2456. 1093.52 s [really-safe-money-gen] Warning: Money.QuantisationFactor.Gen: could not find link destinations for:
  2457. 1093.52 s [really-safe-money-gen] - Money.QuantisationFactor.QuantisationFactor
  2458. 1093.52 s [really-safe-money-gen] Warning: Money.Currency.Gen: could not find link destinations for:
  2459. 1093.52 s [really-safe-money-gen] - Money.Currency.Currency
  2460. 1093.52 s [really-safe-money-gen] Warning: Money.MultiAmount.Gen: could not find link destinations for:
  2461. 1093.52 s [really-safe-money-gen] - Money.MultiAmount.MultiAmount
  2462. 1093.52 s [really-safe-money-gen] Warning: Money.MultiAccount.Gen: could not find link destinations for:
  2463. 1093.52 s [really-safe-money-gen] - Money.MultiAccount.MultiAccount
  2464. 1093.52 s [really-safe-money-gen] Warning: Numeric.DecimalLiteral.Gen: could not find link destinations for:
  2465. 1093.52 s [really-safe-money-gen] - Numeric.DecimalLiteral.DecimalLiteral
  2466. 1106.70 s [really-safe-money-gen] Documentation created: dist/doc/html/really-safe-money-gen/,
  2467. 1106.70 s [really-safe-money-gen] dist/doc/html/really-safe-money-gen/really-safe-money-gen.txt
  2468. 1106.88 s [really-safe-money-gen] Preprocessing test suite 'really-safe-money-test' for really-safe-money-gen-0.0.0.0...
  2469. 1106.91 s [really-safe-money-gen] Phase: installPhase
  2470. 1107.22 s [really-safe-money-gen] Installing library in /nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0/lib/ghc-9.10.3/lib/x86_64-linux-ghc-9.10.3-05f6/really-safe-money-gen-0.0.0.0-DUlrgfbYR751gcgZIqRr4A
  2471. 1108.24 s [really-safe-money-gen] Phase: fixupPhase
  2472. 1108.28 s [really-safe-money-gen] shrinking RPATHs of ELF executables and libraries in /nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0
  2473. 1108.30 s [really-safe-money-gen] shrinking /nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0/lib/ghc-9.10.3/lib/x86_64-linux-ghc-9.10.3-05f6/libHSreally-safe-money-gen-0.0.0.0-DUlrgfbYR751gcgZIqRr4A-ghc9.10.3.so
  2474. 1108.32 s [really-safe-money-gen] checking for references to /build/ in /nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0...
  2475. 1108.38 s [really-safe-money-gen] patching script interpreter paths in /nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0
  2476. 1108.39 s [really-safe-money-gen] stripping (with command strip and flags -S -p) in /nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0/lib
  2477. 1108.53 s [really-safe-money-gen] shrinking RPATHs of ELF executables and libraries in /nix/store/8730vddj29ahfbhwvq3zg3k4mg8bgavw-really-safe-money-gen-0.0.0.0-doc
  2478. 1108.55 s [really-safe-money-gen] checking for references to /build/ in /nix/store/8730vddj29ahfbhwvq3zg3k4mg8bgavw-really-safe-money-gen-0.0.0.0-doc...
  2479. 1108.59 s [really-safe-money-gen] patching script interpreter paths in /nix/store/8730vddj29ahfbhwvq3zg3k4mg8bgavw-really-safe-money-gen-0.0.0.0-doc
  2480. 1108.60 s [really-safe-money-gen] shrinking RPATHs of ELF executables and libraries in /nix/store/hrdi78hj8y4kxjl1i64lk7vbbmzmy8m6-really-safe-money-gen-0.0.0.0-report
  2481. 1108.63 s [really-safe-money-gen] checking for references to /build/ in /nix/store/hrdi78hj8y4kxjl1i64lk7vbbmzmy8m6-really-safe-money-gen-0.0.0.0-report...
  2482. 1108.69 s [really-safe-money-gen] patching script interpreter paths in /nix/store/hrdi78hj8y4kxjl1i64lk7vbbmzmy8m6-really-safe-money-gen-0.0.0.0-report
  2483. 1109.01 s [post-build-hook] Uploading to cachix cache "sydtest": /nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0 /nix/store/8730vddj29ahfbhwvq3zg3k4mg8bgavw-really-safe-money-gen-0.0.0.0-doc /nix/store/hrdi78hj8y4kxjl1i64lk7vbbmzmy8m6-really-safe-money-gen-0.0.0.0-report
  2484. 1110.10 s [post-build-hook] Pushing 3 paths (196 are already present) using zstd to cache sydtest ⏳
  2485. 1110.11 s [post-build-hook]
  2486. 1110.51 s [post-build-hook] Pushing /nix/store/hrdi78hj8y4kxjl1i64lk7vbbmzmy8m6-really-safe-money-gen-0.0.0.0-report (422.91 KiB)
  2487. 1110.53 s [post-build-hook] Pushing /nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0 (1.52 MiB)
  2488. 1110.90 s [post-build-hook] Pushing /nix/store/8730vddj29ahfbhwvq3zg3k4mg8bgavw-really-safe-money-gen-0.0.0.0-doc (288.17 KiB)
  2489. 1112.17 s [post-build-hook]
  2490. 1112.17 s [post-build-hook] All done.
  2491. 1112.26 s [post-build-hook] Uploading to the NixCI staging cache: /nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0 /nix/store/8730vddj29ahfbhwvq3zg3k4mg8bgavw-really-safe-money-gen-0.0.0.0-doc /nix/store/hrdi78hj8y4kxjl1i64lk7vbbmzmy8m6-really-safe-money-gen-0.0.0.0-report
  2492. 1112.40 s [post-build-hook] warning: 'warn-short-path-literals' is deprecated, use 'lint-short-path-literals = ignore' instead
  2493. 1112.69 s [post-build-hook] copying 3 paths...
  2494. 1112.69 s [post-build-hook] copying path '/nix/store/8730vddj29ahfbhwvq3zg3k4mg8bgavw-really-safe-money-gen-0.0.0.0-doc' to 'https://cache.staging.nix-ci.com'...
  2495. 1112.70 s [post-build-hook] copying path '/nix/store/hrdi78hj8y4kxjl1i64lk7vbbmzmy8m6-really-safe-money-gen-0.0.0.0-report' to 'https://cache.staging.nix-ci.com'...
  2496. 1113.04 s [post-build-hook] copying path '/nix/store/19blz65zqka9gkbs7bp26zx92m50vzp2-really-safe-money-gen-0.0.0.0' to 'https://cache.staging.nix-ci.com'...
  2497. 1114.02 s [post-build-hook] warning: 'warn-short-path-literals' is deprecated, use 'lint-short-path-literals = ignore' instead
  2498. 1114.42 s [post-build-hook] copying 1 paths...
  2499. 1114.42 s [post-build-hook] copying path '/nix/store/95dikkf9gr45c4h8rrm8sqw74h5224ww-really-safe-money-gen-0.0.0.0.drv' to 'https://cache.staging.nix-ci.com'...
  2500. 1114.68 s Progress: 7 of 8 built