[Haskell-cafe] Layout rule (was Re: PrefixMap: code reviewrequest)

Brian Hulley brianh at metamilk.com
Sat Mar 4 10:15:08 EST 2006

Daniel Fischer wrote:
> Am Freitag, 3. März 2006 19:21 schrieb Brian Hulley:
>> Brian Hulley wrote:
>>> Brian Hulley wrote:
> AFAICT, the description in the report is correct, *except for the
> 'where' in module LayOut where*.
> So my guess is that layout-processing is applied only to the
> module-body, not to the module head and probably that should be
> mentioned in the report.

Thanks - that's quite a relief because my incremental parser absolutely 
relies on the indentation of a child block to be more than that of it's 
parent in the AST...

Perhaps a future incarnation of Haskell could just omit the keyword "where" 
in the module head to avoid all this confusion.

Also, all the tutorials (and book) I've read only mention the layout rule in 
passing somewhere deep inside the text and usually give a rather 
unsatisfactory hand-waving description that omits to mention the special 
case for "where" in the module head and/or the need for the sub-block to be 
indented more than the parent block, so I think depending on what tutorials 
people have read, putting this together with the module "where", a lot of 
confusion is floating about...

Perhaps a wiki page is indicated?

Regards, Brian. 

More information about the Haskell-Cafe mailing list