# FW: Layout indentation marking

Simon Peyton-Jones [email protected]
Tue, 12 Mar 2002 04:08:56 -0800

I agree with Ian here (and not just because of what GHC does!)

Does anyone disagree?

Simon

-----Original Message-----
From: Ian Lynagh [mailto:[email protected]
/* <![CDATA[ */
(function(){try{var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a=l.getAttribute('data-cfemail');if(a){s='';r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2){c=parseInt(a.substr(j,2),16)^r;s+=String.fromCharCode(c);}s=document.createTextNode(s);l.parentNode.replaceChild(s,l);}}catch(e){}})();
/* ]]> */
]=20
Sent: 10 March 2002 15:23
Subject: Layout indentation marking

Given this module

module Main where

main :: IO()
main =3D putStrLn $show$ foo

foo :: Int
foo =3D x + y
where x =3D 6
s =3D "foo\
\bar" y =3D 7

nhc98 and hugs correctly (as per the revised report) print 13. ghc gives

q.lhs:11: parse error on input =3D'

I think ghc is in the right here and the report should be updated to

+ Where the start of a lexeme does not follow the end of a lexeme
on
the same line, this lexeme is preceded by <n> where n is the
indentation of the lexeme, provided that it is not, as a
consequence of the first two rules, preceded by {n}. (A string
literal may span multiple lines -- Section 2.6.)

+ Where the start of a lexeme does not follow a complete lexeme on
the same line, this lexeme is preceded by <n> where n is the
indentation of the lexeme, provided that it is not, as a
consequence of the first two rules, preceded by {n}. (A string
literal may span multiple lines -- Section 2.6.)

where I have altered only the first line).

Thanks
Ian

_______________________________________________
`