Re: Question about scope of 'let' and 'where'

2003-03-16 Thread Hal Daume III
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

Re: Context not part of a function definition?

2003-03-16 Thread Bernard James POPE
> 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

Context not part of a function definition?

2003-03-16 Thread Graham Klyne
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

Question about scope of 'let' and 'where'

2003-03-16 Thread Graham Klyne
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