X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fbugs.xml;fp=ghc%2Fdocs%2Fusers_guide%2Fbugs.xml;h=f9fc9648084264ae11b5f92147aec81d975a897b;hb=bafd845b51a36899cdb53970afb3b2c055f94ada;hp=0bdb38c2a8fb26f1423a73768c489593b451a80e;hpb=cabcda7d8cabf1325143969266fc528f7b8352a8;p=ghc-hetmet.git 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