On Thu, Aug 02, 2007 at 02:08:33PM -0700, David Roundy wrote: > This would be a very nice type to have (natural numbers), but is a tricky > type to work with. Subtraction, for instance, wouldn't be possible as a > complete function...
Of course it would. It would just have the type Nat -> Nat -> Integer. This of course means that Nat wouldn't be an instance of Num. Tough luck, and one more reason for more fine-grained algebraic class hierarchy: Nat would be a semiring (as would booleans and finite sets and regular expressions and whatnot). Lauri _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe