It is not. Lets are expressions. Wheres are part of declarations. In a
grammar sense, you have something like:
funcdef ::= name = expr (where decls)?
expr::= let decls in expr
so the declarations inside a let are internal to the expression and can't
go outside into the where clause.
--
H
> I'm trying to use the following idiom to selectively import functions from
> the List module:
>
>import qualified List
>nub= List.nub
>
> but I'm finding that HUGS complains about "unresolved top level
> overloading" with "outstanding context: "Eq b".
>
> If I duplicate the type
I'm trying to use the following idiom to selectively import functions from
the List module:
import qualified List
nub= List.nub
but I'm finding that HUGS complains about "unresolved top level
overloading" with "outstanding context: "Eq b".
If I duplicate the type signature thus:
imp
In the function body (rhs):
let
{ a = (e1) }
in
(e2)
where
{ b = f a }
Does the Haskell specification indicate that the definition of 'a' is
in-scope for the definition of 'b'?
Practical experience using HUGS suggests the answer is no, but my intuition