[Haskell-cafe] positive Int

brad clawsie clawsie at fastmail.fm
Thu Aug 2 15:17:06 EDT 2007


as far as i know, the haskell standard does not define a basic Int
type that is limited to positive numbers.

would a type of this kind not potentially allow us to make stronger
verification statements about certain functions?

for example, 'length' returns an Int, but in reality it must always
return a value 0 or greater. a potential counter-argument would be the
need to possibly redefine Ord etc for this more narrow type...





More information about the Haskell-Cafe mailing list