
11 Nov
2014
11 Nov
'14
8:51 a.m.
On 2014-11-11 at 14:32:47 +0100, Richard Eisenberg wrote:
What would the semantics of subtraction be for this? I'm assuming there would be a `Num` instance for `Natural`.
It wouldn't be total, and 'throw (Underflow :: ArithException)' if the result would fall outside the non-negative domain. This is similiar to how e.g. http://hackage.haskell.org/package/nats-0.2/docs/Numeric-Natural.html handles out-of-domain subtraction results.