Re: Typing of Pattern Synonyms: Required vs Provided constraints

2022-01-06 Thread Gergő Érdi
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

Re: Pattern synonym constraints :: Ord a => () => ...

2021-10-05 Thread Gergő Érdi
> I'm afraid none of this is apparent from the User Guide -- and I even > contributed some material to the Guide, without ever understanding that. > Before this thread, I took it that 'Required' means for building -- as in for > smart constructors. No, that's not what the required/provided

Re: Pattern synonym constraints :: Ord a => () => ...

2021-10-05 Thread Gergő Érdi
If you haven't yet, it is probably a good idea to read section 6 of https://gergo.erdi.hu/papers/patsyns/2016-hs-patsyns-ext.pdf On Wed, Oct 6, 2021 at 10:23 AM Gergő Érdi wrote: > > > I'm afraid none of this is apparent from the User Guide -- and I even > > contribute