[Haskell-cafe] Parse text difficulty

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Thu Dec 9 11:37:13 EST 2004

Robert Dockins <robdockins at fastmail.fm> writes:

> >   Prelude> [1..5] `zipWith (+)` [7..]
> >   <interactive>:1: parse error on input `('
> is there a technical reason for this or did it just happen?

If you are asking why general expressions are prohibited between
backticks, yes, there is a reason.  The expression could be arbitrarily
large, so you might have to search many lines to find the closing
backtick.  But in such a situation, it is surely much more likely
that the programmer has simply forgotten to close the ticks around
a simple identifier.  Just think of the potential for delightfully
baffling type error messages that might result!


More information about the Haskell-Cafe mailing list