[project @ 2005-05-04 10:28:07 by ross]
authorross <unknown>
Wed, 4 May 2005 10:28:08 +0000 (10:28 +0000)
committerross <unknown>
Wed, 4 May 2005 10:28:08 +0000 (10:28 +0000)
commit00007e64fd17385867ab6b835a2ef77575e86229
tree34900dfeb466d08b7eaff1ada24b1c1d2842b5fe
parent0600a65decbd51ded35b950073caafa645405de0
[project @ 2005-05-04 10:28:07 by ross]
Another go at the handling of -< in arrow notation, continuing and
fixing the changes in

http://www.haskell.org/pipermail/cvs-all/2005-April/040391.html

Now do the same thing in the renamer as we do in the type checker,
i.e. return to the environment of the proc when considering the left
argument of -<.

This is much simpler than the old proc_level stuff, and matches the
type rules more clearly.  But there is a change in error messages.
For the input

f :: Int -> Int
f = proc x -> (+x) -< 1

GHC 6.4 says

test.hs:6:
    Command-bound variable `x' is not in scope here
Reason: it is used in the left argument of (-<)
    In the second argument of `(+)', namely `x'
    In the command: (+ x) -< 1
    In the definition of `f': f = proc x -> (+ x) -< 1

but now we just get the blunt

test.hs:6:16: Not in scope: `x'

The beauty is all on the inside.

Similarly leakage of existential type variables (arrow1) is detected,
but the error message isn't very helpful.
ghc/compiler/rename/RnExpr.lhs
ghc/compiler/typecheck/TcArrows.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcRnTypes.lhs