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
On Tue, Dec 11, 2001 at 01:17:07PM +0000, Ian Lynagh wrote:
{ foo = 5 }
ERROR tt.hs:2 - Syntax error in input (unexpected `{', possibly due to bad layout)
I still think this is an error.
module Foo where { foo = 5 bar = 6 }
ERROR tt.hs:4 - Syntax error in definition (unexpected `=')
But this isn't as discussed elsewhere. Thanks Ian
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
On Tue, Dec 11, 2001 at 11:39:48AM -0800, Johan Nordlander wrote:
On Tuesday, December 11, 2001, at 05:17 AM, Ian Lynagh wrote:
{ foo = 5 }
I'm afraid both your examples are incorrect. The first one isn't a valid Haskell module (as you're probably aware), and the
Why not? Thanks Ian
On Tue, Dec 11, 2001 at 11:39:48AM -0800, Johan Nordlander wrote:
On Tuesday, December 11, 2001, at 05:17 AM, Ian Lynagh wrote:
{ foo = 5 }
I'm afraid both your examples are incorrect. The first one isn't a valid Haskell module (as you're probably aware), and the
Why not?
Thanks Ian
I stand corrected! The report actually allows the form of your first example. I've fixed the Hugs parser, and the change will be included in the upcoming release. All the best, Johan
participants (2)
-
Ian Lynagh -
Johan Nordlander