[Haskell-cafe] Positive integers

Henning Thielemann lemming at henning-thielemann.de
Mon Mar 27 11:36:15 EST 2006

On Mon, 27 Mar 2006, Neil Mitchell wrote:

>> Doesn't Ada have constrained number types which have similar behaviour?
> Yes. Just for comparison, the behaviour of the Ada number is to throw
> an exception at runtime if a number overflows its bounds. If these
> checks can be eliminated statically, then they are. If an operation
> will always give a runtime error then this is given as a warning at
> compile time.

Quite similar to Modula (maybe also Pascal), as I indicated. There the 
bounded integers are called sub-ranges.

More information about the Haskell-Cafe mailing list