Re: convention around pattern synonyms

2021-12-30 Thread Viktor Dukhovni
On Thu, Dec 30, 2021 at 04:46:29PM +, Richard Eisenberg wrote: > I agree that this kind of backward-compatibility pattern synonym is > good and shouldn't be prefixed with PS_. > > But do you have a concrete example of this leakage of an internal GHC > type via TH? While I can imagine this hap

Re: convention around pattern synonyms

2021-12-30 Thread Richard Eisenberg
I agree that this kind of backward-compatibility pattern synonym is good and shouldn't be prefixed with PS_. But do you have a concrete example of this leakage of an internal GHC type via TH? While I can imagine this happening, I don't know of any examples in practice. Note that even enumeratio

Re: Avoiding full laziness xform / floating-out (Re: What's the benefit of taking "do" blocks apart? Is there a way to turn that off?)

2021-12-30 Thread Erdi, Gergo via ghc-devs
PUBLIC Ah, at least I've figured out why exactly the simplifier does this (regardless of floating out due to full laziness or not): it is because the definition of the default implementation of (>>) is inlined. I have (>>) defined as such: ma >> mb = ma >>= \_ -> mb So when the simplifier

RE: [External] Re: Avoiding full laziness xform / floating-out (Re: What's the benefit of taking "do" blocks apart? Is there a way to turn that off?)

2021-12-30 Thread Erdi, Gergo via ghc-devs
PUBLIC Turning on various Opt_D_dump flags, I can see that this tranformation happens in the first iteration of the simplifier. Looking at GHC.Core.Opt.getCoreToDo, I would guess this corresponds to this line: -- initial simplify: mk specialiser happy: minimum effort please runW

Re: Avoiding full laziness xform / floating-out (Re: What's the benefit of taking "do" blocks apart? Is there a way to turn that off?)

2021-12-30 Thread Matthew Pickering
Hi Gergo, Sounds like you might be better off writing your own optimisation pass rather than relying on making GHC do what you want. Cheers Matt On Thu, Dec 30, 2021 at 9:05 AM Erdi, Gergo via ghc-devs wrote: > > PUBLIC > > Hi Joachim, > > Thanks for the hints! > > > Hi Gergo, > > > > Am Diens

Avoiding full laziness xform / floating-out (Re: What's the benefit of taking "do" blocks apart? Is there a way to turn that off?)

2021-12-30 Thread Erdi, Gergo via ghc-devs
PUBLIC Hi Joachim, Thanks for the hints! > Hi Gergo, > > Am Dienstag, dem 28.12.2021 um 15:57 + schrieb Erdi, Gergo via ghc- > devs: > > PUBLIC > > phew Yeah obviously I'm sitting here not only adding these tags, but also coming up with the automated systems and also the company policies