[jhc] comment on final line with no trailing newline
Mark Wotton
mwotton at gmail.com
Wed Aug 19 04:44:24 EDT 2009
if you have a comment on the final line of a file, and don't follow it
with a newline, jhc rejects the program:
18:30 ~/src/jhc % jhci test.hs
jhci test.hs
jhc 0.6.2 (-n krasyupheasy-10
)
Finding Dependencies...
Using Ho Cache: '/Users/mwotton/.jhc/cache'
test.hs:2:17: Unterminated end-of-line comment
18:30 ~/src/jhc % cat test.hs
main = putStrLn "foo"
--%
arguably not a bug, if you look at Haskell's lexical syntax, you get
comment -> dashes [ any<symbol> {any}] newline
still, there's an obvious interpretation for the program... might it
be worth special-casing it?
mark
More information about the jhc
mailing list