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

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