[Picking up a cafe thread from February that fits here
https://mail.haskell.org/pipermail/haskell-cafe/2021-February/133459.html.]
Am 23.02.21 um 20:07 schrieb Richard Eisenberg:
>* You might be interested in my recent paper on exactly this problem:
*>* how to make DatatypeContexts actually work t
On Fri, 7 Jan 2022 at 09:08, Richard Eisenberg wrote:
>
>
> On Jan 5, 2022, at 9:19 PM, Anthony Clayden
> wrote:
>
> So Pattern syns seem to be giving exactly the 'stupid theta' behaviour.
>
>
> In your example, yes: the Required context is "stupid" in the way that
> "stupid theta" is. The reaso
Thanks Gergö, I do find Richard's tendency to use ViewPattern examples
distracts me from understanding the point. That arrow-to-nowhere or
arrow-to-the-wrong-value syntax is nausea-inducing.
Your "instructive" example is really nothing to do with PatSyns, just
ordinary Haskell numeric patterns: th
Fwiw, a less contrived, and much more relatable, version of Richard's
example would be
pattern Is3 :: (Num a, Eq a) => a -- only a Required constraint
pattern Is3 = 3 -- a polymorphic literal!
I think it can be quite instructive for people new to patsyn typing to work
out why this is exactly t
> On Jan 5, 2022, at 9:19 PM, Anthony Clayden
> wrote:
>
> So Pattern syns seem to be giving exactly the 'stupid theta' behaviour.
In your example, yes: the Required context is "stupid" in the way that "stupid
theta" is. The reason to have a Required context is if your pattern synonym
does