[Haskell-cafe] Pattern synonyms and explicit forall.

Anthony Clayden anthony.d.clayden at gmail.com
Sat Sep 18 12:12:08 UTC 2021


The end of your error message:

>       |
>    63 | pattern Any a <- Some a
>       |                       ^


Appears to have program text (a mono-directional pattern binding) that
doesn't correspond to the program text you quote.


Whereas

>    pattern Any :: forall a. a -> Some

>    pattern Any a = Some


Is a implicitly bi-directional pattern binding that will never work. (The
free var `a` on LHS does not appear in RHS.)

I'm suspecting the explicit forall is not much to do with it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210919/a5c43384/attachment.html>


More information about the Haskell-Cafe mailing list