ghci problem parsing where
Ian Lynagh
igloo at earth.li
Mon Oct 1 07:09:05 EDT 2001
On Mon, Oct 01, 2001 at 11:38:33AM +0100, Simon Marlow wrote:
>
> > Using GHC Interactive, version 5.02:
> >
> > Prelude> x where x = 5
> > <interactive>:1: parse error on input `where'
> >
> > let works fine:
> >
> > Prelude> let x = 5 in x
> > 5
>
> 'where' clauses aren't allowed on an arbitrary expression. They are
> allowed as part of a declaration only - see the 'rhs' production in the
> Haskell grammar.
Ah, yes, thanks, I'm just used to it working in hugs :-)
Ian
More information about the Glasgow-haskell-bugs
mailing list