> For example, take UNIX nice levels -20 to 19.  You could have
>   data ConstrainedInteger = CI {distToMax :: Natural, distToMin :: Natural}
> this would ensure only the 40 integers can be represented.
> Then you could have _something_ that defined what happened on overflow,
> whether it wraps, reflects, errors, truncates or whatever.

Doesn't Ada have constrained number types which have similar behaviour?

--
burton samograd                                                [EMAIL PROTECTED]
kruhft.blogspot.com   www.myspace.com/kruhft   metashell.blogspot.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to