
6 Apr
2018
6 Apr
'18
11:53 p.m.
2018-04-07 1:11 GMT+02:00 Simon Jakobi
2. mtimesDefault be moved to Data.Monoid (possibly with a deprecated re-export from Data.Semigroup)
In case 2, I also think mtimesDefault should be made an alias of stimesMonoid.
If we want to keep mtimesDefault, an even better idea might be to make it use the version of stimes for the return type. That means changing the definition from mtimesDefault :: (Integral b, Monoid a) => b -> a -> a mtimesDefault n x | n == 0 = mempty | otherwise = unwrapMonoid (stimes n (WrapMonoid x)) to mtimesDefault :: (Integral b, Monoid a) => b -> a -> a mtimesDefault n x | n == 0 = mempty | otherwise = stimes n x Sorry for not thinking this through in the first place. Simon