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

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