Layout rules. (was Re: Another bug in the 98 Report?)

1999-07-01 Thread Kevin Atkinson
Malcolm Wallace wrote: Mark P Jobes wrote: | Something like the following can be used in Hugs 98: | | f x = case x of | (a,b) - case a of | (c,d) - case b of | (e,f) - [c,d,e,f] You can't be serious! This is a great example of mis-using layout to baffle

Re: Another bug in the 98 Report?

1999-07-01 Thread Malcolm Wallace
First, a preface to my comments on layout processing: it seems to me that the purpose of the layout rules is to give the programmer FOWIM (Figure Out What I Mean) syntax. Hence, if it isn't immediately clear to a human reader what grouping is intended, then the layout rules are not helping.

RE: Another bug in the 98 Report?

1999-06-25 Thread Simon Marlow
Re: layout changes in Haskell 98 Having had a bit more time to muse over this issue and discuss it with Simon P.J., we came to the conclusion that the issue is far from concluded. The Haskell 98 layout rule still has some problems (shock! :-) This message is indended to summarise what I

Re: Another bug in the 98 Report?

1999-06-25 Thread Marcin 'Qrczak' Kowalczyk
Fri, 25 Jun 1999 09:25:48 -0700, Simon Marlow [EMAIL PROTECTED] pisze: f = f where g = g then it isn't immediately clear whether the 'g = g' declaration belongs to the where clause, or to the top level (and the where clause is empty). Hmm, is it so important to allow using

Re: Another bug in the 98 Report?

1999-06-24 Thread Malcolm Wallace
Simon explains why my three examples are in fact okay: | f a b c = |defs x |where |x = ... | | That's fine, the new layout rule doesn't change the parsing of this | definition. Remember, the outer syntax level starts with the 'f', the inner | level with the 'x ='. | [... etc ...]

Re: Another bug in the 98 Report?

1999-06-24 Thread Mike Thyer
Malcolm writes: Unfortunately, the example given in the Report is nothing like as clear - in fact, I still don't understand it. Perhaps someone could explain it to me? f x = let h y = let p z = z in p in h Here, the definition of p is indented less than the

Another bug in the 98 Report?

1999-06-23 Thread Malcolm Wallace
Someone recently submitted a bug report to the Hugs list as follows: class C a where f :: a f = undefined is parsed by Hugs as class C a where{ f :: a ;f = undefined} which is incorrect - according to the specification of the layout rule in the Haskell 98 report, it should be parsed as class