[Haskell-cafe] ReadS with Maybe

Henning Thielemann iakd0 at clusterf.urz.uni-halle.de
Mon Jan 3 14:48:26 EST 2005


What is the reason for the definition

 ReadS a = [(a, String)]

not being

 ReadS a = Maybe (a, String)

? The latter one reflects that either one or no value is read, whereas the
first definition allows an arbitrary number of read values which is
confusing and unsafe in my opinion.



More information about the Haskell-Cafe mailing list