Skip to content

-XArrows confusing error about variable not in scope

Summary

ghci> :set -XArrows
ghci> (proc x -> (| \_ -> x |) ())

<interactive>:7:21: error:
    • Variable not in scope: x
    • Perhaps you meant ‘x’ (line 7)

Expected behavior

I'm not sure if this should work, but if not, the error should ideally explain why I can't use x here

Environment

  • GHC version used: 9.2.1
Edited by Jakob Brünker
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information