Skip to content

Inaccessible binding in the same decl group is suggested in view pattern

Summary

GHC suggests to use an existing function with matching name in a view pattern, even though it is not in scope.

Steps to reproduce

(v -> _) = undefined
v = undefined
-- • Variable not in scope: v :: t0 -> t1
-- • Perhaps you meant ‘v’

Expected behavior

GHC does not suggest to use v

Edited by sheaf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information