[Haskell] readList oddity
waldmann at imn.htwk-leipzig.de
Thu Oct 21 07:57:28 EDT 2004
> Because of that, calling error in one of your read functions seems a bad
> idea. In fact, returning an empty list is the right way to return an error
> in the prelude's parsing framework. If you want something different (e.g.,
> because you want better error messages) you should not be using the
> prelude's read function.
indeed I use Parsec in this project, because of better error reporting,
and because it evaluates more eager. But in this case an external
library (Wash) was expecting that I provide a Read instance.
I now think I should have overridden the default definition of readList.
-- Johannes Waldmann, Tel/Fax: (0341) 3076 6479 / 6480 --
------ http://www.imn.htwk-leipzig.de/~waldmann/ ---------
More information about the Haskell