Language.Haskell.Parser and layout rules
John Meacham
john at repetae.net
Fri Feb 18 19:54:56 EST 2005
On Thu, Feb 17, 2005 at 02:17:42PM +0000, Malcolm Wallace wrote:
> Ross Paterson <ross at soi.city.ac.uk> writes:
>
> > The Report (section 9.3, especially notes 1 and 2) says "A nested context
> > must be further indented than the enclosing context", so this is illegal.
> > GHC and Hugs have innovated here, ...
>
> I see you are using "innovated" here in the Microsoft sense, meaning
> "undocumented and incompatible departure from standards". :-)
I think of this as a very useful feature. it should be documented in the
extensions section. mainly, I find it very useful in two circumstances:
short circuit return:
main = do
foo
if bar then return baz else do
whizz
bang
with declarations
main = do
withCString x $ \x' -> do
withCString y $ \y' -> do
c_func x' y'
John
--
John Meacham - ⑆repetae.net⑆john⑈
More information about the Libraries
mailing list