From: simonmar Date: Thu, 17 Feb 2005 14:41:36 +0000 (+0000) Subject: [project @ 2005-02-17 14:41:36 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1058 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=bafd845b51a36899cdb53970afb3b2c055f94ada [project @ 2005-02-17 14:41:36 by simonmar] Mention GHC's relaxation of the layout rule --- diff --git a/ghc/docs/users_guide/bugs.xml b/ghc/docs/users_guide/bugs.xml index 0bdb38c..f9fc964 100644 --- a/ghc/docs/users_guide/bugs.xml +++ b/ghc/docs/users_guide/bugs.xml @@ -46,7 +46,27 @@ Context-free syntax - + + + GHC is a little less strict about the layout rule when used + in do expressions. Specifically, the + restriction that "a nested context must be indented further to + the right than the enclosing context" is relaxed to allow the + nested context to be at the same level as the enclosing context, + if the enclosing context is a do + expression. + + For example, the following code is accepted by GHC: + + +main = do args <- getArgs + if null args then return [] else do + ps <- mapM process args + mapM print ps + + + + GHC doesn't do fixity resolution in expressions during parsing. For example, according to the Haskell report, the