[Haskell-cafe] How to read safely?

Marcos Viera marcosomarviera at gmail.com
Tue Jun 30 14:16:37 EDT 2009


The package ChristmasTree includes an alternative version of read which 
catches (and repairs if you want) errors.

The package contains the code of the paper
@inproceedings{1411296,
author = {Marcos Viera and S. Doaitse Swierstra and Eelco Lempsink},

title = {Haskell, do you read me?: constructing and composing efficient 
top-down parsers at runtime}, booktitle = {Haskell '08: Proceedings of 
the first ACM SIGPLAN symposium on Haskell},

year = {2008},
isbn = {978-1-60558-064-7},
pages = {63--74},
location = {Victoria, BC, Canada},
doi = {http://doi.acm.org/10.1145/1411286.1411296},
publisher = {ACM},
address = {New York, NY, USA},
}


cheers,
  marcos

[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ChristmasTree



Magicloud Magiclouds wrote:
> Hi,
>   Read often throws runtime errors, which breaks the robust of the
> problem. How to deal with it? Without lost too much proformance (so
> reads is a no).
>   At least, if its error could be catched, that'd be better.



More information about the Haskell-Cafe mailing list