
31 Jul
2015
31 Jul
'15
11:30 a.m.
Is there anything in haskell that represents an unsigned Int class? namely, something bounded below at 0? If not, is it possible to define an Int in this way to add the bounded constraint (I can't immagine trying to define Int like this, there has got to be a better way that I haven't quite understood in my study of haskell). data UnsignedInt = 0 | 1 | 2 | (...) for a long time doing that ... deriving (Show, Eq, Ord, Bounded, Read) Thanks, Derek