[Haskell-cafe] Counterintuitive ScopedTypeVariables behaviour

Alexis King lexi.lambda at gmail.com
Wed Aug 19 17:41:13 UTC 2020


…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-types/proposals/scoped-type-variables-types.rst <https://github.com/ghc-proposals/ghc-proposals/blob/scoped-type-variables-types/proposals/scoped-type-variables-types.rst>.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20200819/2c51ca47/attachment.html>


More information about the Haskell-Cafe mailing list