The lex function in the standard prelude for Hugs is not defined in the
same way as the Haskell 1.4 Report specifies. The difference is that
the subfunction isSingle is defined differently:
Haskell Report 1.4
isSingle c = c `elem` ",;()[]{}_`"
Hugs
isSingle c = c `elem` ",;()[]{}_"
The effect is that Hugs returns an empty parse for any string containing
a backquote (`) rather than a single token.
(it seems unlikely that the Report is wrong as the behaviour is rather
perverse)
How does Hugs treat the Prelude.hs file? will it object if I modify it?
Justin Cormack