Typing pattern synonyms

Bardur Arantsson spam at scientician.net
Wed Sep 30 18:26:40 UTC 2015

On 09/30/2015 08:10 PM, David Feuer wrote:
> The Eq constraint is needed to support pattern matching, the raison d’être
> of pattern synonyms. I'm pretty sure the reason you need
> ScopedTypeVariables for your second example is that GHC only allows pattern
> signatures with that extension enabled. Once upon a time there was a
> separate PatternSignatures extension, I believe, but not any more.

Perhaps ScopedTypeVariables by default (or only?) would be relevant for
the revamped[1] Haskell' committee?

Would there be any actual downsides? It's always seemed to me that
ScopedTypeVariables was the way it should have been from the start
(given perfect foresight).


[1] http://permalink.gmane.org/gmane.comp.lang.haskell.prime/3965

More information about the Glasgow-haskell-users mailing list