
17 Feb
2005
17 Feb
'05
9:03 a.m.
On Thu, Feb 17, 2005 at 01:40:31PM +0100, Mirko Rahn wrote:
The function Language.Haskell.Parser.parseModule behaves somehow strange and disagrees with ghc-6.* about the set of accepted inputs. An example:
-- file T1.hs: main = do args <- getArgs if null args then return [] else do ps <- mapM process args mapM print ps
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, but only where the inner context is a do expression; they don't accept f xs = case xs of y:ys -> case ys of z:zs -> zs