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

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