I wrote:
>> In addition, OverloadedStrings is unsound.

J. Garrett Morris wrote:
> fromString can throw errors, just like fromInteger

This is true; the use of polymorphism
for numeric literals is also unsound.

However, in practice, it is rare for there to be
dangerous instances of the numeric type classes.

> this is no less sound than any Haskell function
> throwing an exception.

No. Usually, operations that can throw an exception
are in the IO monad, where the specter of a
potential exception is more obvious, and where the
operation can be wrapped in try or catch.

Whereas a string literal that might throw an exception
at run time is bizarre, to say the least. And it is
extremely difficult to deal with potential exceptions
thrown by fundamental language syntax that is
sprinkled throughout nearly every Haskell module
in existence.

Yitz

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to