
19 Aug
2020
19 Aug
'20
5:41 p.m.
…and now Krzysztof Gogolewski has already chimed in with an explanation:
The documentation is outdated (it was written in 2006). Scoped type variables can use arbitrary types since #15050 (closed), https://github.com/ghc-proposals/ghc-proposals/blob/scoped-type-variables-ty... https://github.com/ghc-proposals/ghc-proposals/blob/scoped-type-variables-ty....
So the issue is a documentation bug, and my explanation is how GHC is intended to operate. The linked proposal includes a little additional context, including a short paper, Type variables in patterns https://arxiv.org/pdf/1806.03476.pdf (published at Haskell ’18). Mystery resolved—though the docs still need fixing. Alexis