kirancodes.me
To Proof Maintenance & Beyond!

Haskell, do you read me?: constructing and composing efficient top-down parsers at runtime

Marcos Viera, S. Doaitse Swierstra, Eelco Lempsink

Abstract

The Haskell definition and implementation of read is far from perfect. In the first place read is not able to handle the associativities defined for infix operators. Furthermore, it puts constraints on the way show is defined, and especially forces it to generate far more parentheses than expected. Lastly, it may give rise to exponential parsing times. All this is due to the compositionality requirement for read functions, which imposes a top-down parsing strategy.

Related papers