Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug or an Issue?

2 views
Skip to first unread message

Tige

unread,
Jun 22, 2001, 12:59:33 AM6/22/01
to
Prelude> square x = x * x
ERROR - Syntax error in input (unexpected `=')

I can't seem to define anything on Haskell.
It says Unexpected '='.
I am running Hugs98 latest 2001 Version right off the Website Windows
Install File.

What am i doing wrong?


Mark Wotton

unread,
Jun 22, 2001, 2:36:04 AM6/22/01
to
On Fri, 22 Jun 2001 04:59:33 GMT, Tige posted:

You can't define functions at the toplevel in hugs.
Put it in a file and run it from there.

(Yes, it is irritating.)

mrak

Tige

unread,
Jun 22, 2001, 7:43:07 AM6/22/01
to
Yep, figured that out. I got hold of an official Hugs PDF which says
the same thing. :)

Thanks


"Mark Wotton" <mwo...@hons.cs.usyd.edu.au> wrote in message
news:9gup0k$gop$1...@spacebar.ucc.usyd.edu.au...

Marcin 'Qrczak' Kowalczyk

unread,
Jun 22, 2001, 11:37:22 AM6/22/01
to
22 Jun 2001 06:36:04 GMT, Mark Wotton <mwo...@hons.cs.usyd.edu.au> pisze:

> You can't define functions at the toplevel in hugs.

Indeed. But you can in GHCi which comes with ghc >= 5.00.

--
__("< Marcin Kowalczyk * qrc...@knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK

Nimish Shah

unread,
Jun 24, 2001, 5:01:16 AM6/24/01
to
On %Date, Tige wrote:

You are not putting your source code in a separate text file and then
loading it with the :l command.

Nim.

0 new messages