
On Sep 7, 2020, at 8:04 AM, Tom Ellis
wrote: On the other hand I'm still somewhat concerned that the meaning of the syntax can vary depending on whether the type variable is in scope or not.
Yes. This has been a spot of discomfort for some time (at least for me, and I know I'm not completely alone). A recent accepted, unimplemented proposal (https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0285-no...) describes -XNoPatternSignatureBinds, which disallows not-in-scope variables from appearing in pattern signatures. Instead, the variable must come into scope some other way. That "other way" depends on proposals not yet completely formed/accepted, but once the dust has settled, I think you'll get what you want with -XNoPatternSignatureBinds. Richard