Ticket #42 (closed bug report: fixed)

Opened 8 years ago

Last modified 8 years ago

nested do blocks without extra indentation

Reported by: sebf@… Owned by: nibro
Priority: major Milestone: Full code support
Component: parser Version: 0.5.4
Keywords: Cc: sebf@…


HSE (0.5.5) fails to parse this program:

nestedDoBlocks = getChar >>= (\c1 -> do
                 getChar >>= (\c2 -> do
                 getChar >>= (\c3 -> return [c1,c2,c3])))

If the last line is indented one more space then it parses fine.

GHC parses both versions. I think it's more likely that this is a bug in GHC rather than HSE but am not sure..

Change History

Changed 8 years ago by nibro

  • status changed from new to closed
  • resolution set to fixed

Thanks for reporting. This is what's called the relaxed do-layout rules in GHC. It's a documented feature but it's not H98. It wasn't my intention to use it, but I've had several complaints about it, so I caved in. This now works in 0.5.6, case closed.

Note: See TracTickets for help on using tickets.