comment on final line with no trailing newline
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
On Wed, Aug 19, 2009 at 06:44:24PM +1000, Mark Wotton wrote:
still, there's an obvious interpretation for the program... might it be worth special-casing it?
I included a fix in the most recent patch bundle. oddly enough, it didn't require adding a special case, it required removing one. I specifically checked for that case and failed for some reason. How did you actually come about finding this bug in the wild? I had to break out the hex editor to get a file with no newline at the end :) John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
On 20/08/2009, at 2:29 PM, John Meacham wrote:
On Wed, Aug 19, 2009 at 06:44:24PM +1000, Mark Wotton wrote:
still, there's an obvious interpretation for the program... might it be worth special-casing it?
I included a fix in the most recent patch bundle. oddly enough, it didn't require adding a special case, it required removing one. I specifically checked for that case and failed for some reason.
How did you actually come about finding this bug in the wild? I had to break out the hex editor to get a file with no newline at the end :)
Emacs doesn't add newlines at the end. You're a vim user, I take it. :) mark
On Thu, Aug 20, 2009 at 02:30:38PM +1000, Mark Wotton wrote:
Emacs doesn't add newlines at the end. You're a vim user, I take it. :)
Yes I am :) John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
participants (2)
-
John Meacham -
Mark Wotton