<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">…and now Krzysztof Gogolewski has already chimed in with an explanation:<div class=""><br class=""></div><div class=""><blockquote type="cite" class="">The documentation is outdated (it was written in 2006). Scoped type variables can use arbitrary types since #15050 (closed), <a href="https://github.com/ghc-proposals/ghc-proposals/blob/scoped-type-variables-types/proposals/scoped-type-variables-types.rst" class="">https://github.com/ghc-proposals/ghc-proposals/blob/scoped-type-variables-types/proposals/scoped-type-variables-types.rst</a>.</blockquote><br class=""></div><div class="">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, <a href="https://arxiv.org/pdf/1806.03476.pdf" class="">Type variables in patterns</a> (published at Haskell ’18). Mystery resolved—though the docs still need fixing.</div><div class=""><br class=""></div><div class="">Alexis</div></body></html>