Re: [Haskell-cafe] Pattern synonyms and explicit forall.

18 Sep
2021
18 Sep
'21
11:59 p.m.
And there's not a mention in the docos that this is even a thing.
To moderate myself ... There's one example pattern sig with explicit `forall`s, and it's wrt existentials/GADTs. https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/pattern_synonyms.htm..., bullet wrt lexically-scoped tyvars. It doesn't say you can have a dangling `forall` quantifying nothing -- indeed that you need such a thing in this case. It looks like if you want to constrain the existential, you have to declare that in the datatype, then repeat it in the sig for the pattern.
1343
Age (days ago)
1343
Last active (days ago)
0 comments
1 participants
participants (1)
-
Anthony Clayden