Open johnynek opened 7 years ago
seems fromNonNegInt only needs sumN(one, n). one is from MultiplicativeMonoid and sumN is from AdditiveMonoid so Rig
fromNonNegInt
sumN(one, n)
one
sumN
AdditiveMonoid
Rig
fromPosInt would only need Semiring.
fromPosInt
Semiring
We don't have Pos or NonNeg types. We could add them or add unsafe functions.
Pos
NonNeg
seems
fromNonNegInt
only needssumN(one, n)
.one
is from MultiplicativeMonoid andsumN
is fromAdditiveMonoid
soRig
fromPosInt
would only needSemiring
.We don't have
Pos
orNonNeg
types. We could add them or add unsafe functions.