« Return to Thread: How to read safely?

Re: How to read safely?

by Marcos Viera :: Rate this Message:

Reply to Author | View in Thread

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.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

 « Return to Thread: How to read safely?