[Haskell-cafe] NaN as Integer value

Franco franco00 at gmx.com
Sat Apr 13 18:41:23 CEST 2013


> Hello haskellers,is there a reason why Integer doesn't have 'NaN' as
value?I think it would be very convenient to be able to handle (1 `div` 0)
as regular NaN value and not as exception.Thanks.
> 

I think because, if you need NaN like values, `Maybe Int` does the same job
without tainting the definition of `Int`.





More information about the Haskell-Cafe mailing list