[GHC] #10884: Indentation requirements for parsing seem inconsistent
GHC
ghc-devs at haskell.org
Tue Sep 15 17:59:16 UTC 2015
#10884: Indentation requirements for parsing seem inconsistent
-------------------------------------+-------------------------------------
Reporter: Samvh | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
(Parser) | Keywords: parsing,
Resolution: invalid | indentation, do-notation
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by ezyang):
* status: new => closed
* resolution: => invalid
Comment:
This is due to `NonDecreasingIndentation`, which is not per Haskell98 but
useful in cases where you want to open a do-block without increasing
indentation. This will parse fail:
{{{
{-# LANGUAGE NoNondecreasingIndentation #-}
f = let y = do
Just 1
in y
}}}
Non-decreasing indentation doesn't work at the top level, because if you
applied it there, there would be no indentation you could drop back in
order to get out of a do-block.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10884#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list