Incorrect syntax errors

Johan Nordlander nordland@cse.ogi.edu
Tue, 11 Dec 2001 11:39:48 -0800


On Tuesday, December 11, 2001, at 05:17  AM, Ian Lynagh wrote:

>
> Hi guys,
>
>
> With the module
>
>     {
>      foo = 5
>     }
>
> I get
>
>     ERROR tt.hs:2 - Syntax error in input (unexpected `{', possibly due
>                     to bad layout)
>
>
> and with the module
>
>     module Foo where {
>      foo = 5
>      bar = 6
>     }
>
>     ERROR tt.hs:4 - Syntax error in definition (unexpected `=')
>
>
> Thanks
> Ian
>

Hi Ian,

I'm afraid both your examples are incorrect.  The first one 
isn't a valid Haskell module (as you're probably aware), and the 
Hugs extension that allows free-floating declarations on the 
top-level isn't meant to handle explicit braces.

The second example is incorrect because it uses explicit syntax, 
but lacks any semicolons.

All the best,
Johan