[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.
Showing with 61 additions and 36 deletions