<div dir="auto">There even was a ghc branch with partial work towards implementing this as part of fgaz’s gsoc.  </div><div dir="auto"><br></div><div dir="auto">I’m happy to help out if any spare cycles are needed to work through the details </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 6, 2022 at 5:26 AM Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com">simon.peytonjones@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_default" style="font-family:tahoma,sans-serif">
There is a (stale) ghc-proposal for that,<br>
<a href="https://github.com/ghc-proposals/ghc-proposals/pull/357" rel="noreferrer" target="_blank">https://github.com/ghc-proposals/ghc-proposals/pull/357</a></div></blockquote><div><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">So there is!  Thank you.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">Gergo: would you like to take over this proposal, revise it if necessary in the light of the comments, and submit it?</div></div><div dir="ltr"><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">Simon</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 6 May 2022 at 10:08, Oleg Grenrus <<a href="mailto:oleg.grenrus@iki.fi" target="_blank">oleg.grenrus@iki.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">There is a (stale) ghc-proposal for that,<br>
<a href="https://github.com/ghc-proposals/ghc-proposals/pull/357" rel="noreferrer" target="_blank">https://github.com/ghc-proposals/ghc-proposals/pull/357</a><br>
<br>
- Oleg<br>
<br>
On 6.5.2022 12.04, Simon Peyton Jones wrote:<br>
> Dear devs<br>
><br>
> At the moment the INLINEABLE pragma means "capture my right-hand side,<br>
> regardless of how big it is, so that it can be type-class-specialised,<br>
> including in other modules".  But it /also /says "feel free to inline me".<br>
><br>
> Some users (eg Gergo) want to say NOINLINE on some functions. But for<br>
> these they'd still like to generate type-class-specialised versions. <br>
> After all, if we aren't going to inline them, specialising is the next<br>
> best thing.<br>
><br>
> But we have no way to say both "specialise me" and "don't inline me",<br>
> because you can't say both INLINEABLE and NOINLINE.  (That would look<br>
> silly.)<br>
><br>
> I think we should probably just bite the bullet and add a<br>
> SPECIALISABLE pragma, /orthogonal to INLINE/NOINLNE/, which say<br>
> "capture my right-hand side, regardless of how big it is, so that it<br>
> can be type-class-specialised, including in other modules".  It<br>
> behaves exactly like INLINEABLE except that  you can specify it along<br>
> with INLINE/NOINLINE.<br>
><br>
> Any thoughts?  Do you think this needs a GHC proposal?<br>
><br>
> See #21036 <<a href="https://gitlab.haskell.org/ghc/ghc/-/issues/21036#note_407930" rel="noreferrer" target="_blank">https://gitlab.haskell.org/ghc/ghc/-/issues/21036#note_407930</a>><br>
><br>
><br>
> Simon<br>
><br>
> _______________________________________________<br>
> ghc-devs mailing list<br>
> <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div></div>