<div dir="ltr">I'm -1 on the proposal of adding this type to base. <div><br>One one hand, natural-transformation already provides this definition in a "centralized" locale for folks who really do want to share it with a ridiculously stripped down set of dependencies, which provides a place for those who really want to get it from a central location as well. Not as nice as no dependency at all in a world where we could all agree this is the best thing to add to base, but darn close.</div><div><br>On the other:</div><div><br></div><div>As a type alias there is no real compatibility gain to be had. If both of us define (~>) as above, then types written with types against my (~>) and types written against your (~>) are <i>freely interchangeable</i>, even if you might have to play with your import lists more carefully. <br><div><br>We can't hang any instances off of it, so almost all of the standard arguments for moving it "closer to base" fail to take effect.<br></div><div><br></div><div>On the other, other hand, something like</div><div><br></div><div>newtype f ~> g = Nat { runNat :: forall a. f a -> g a }</div><div><br></div><div>is slightly easier to make a case for, because you can hang instances off of it and share more than one line of code, but I'd be -1 on that as well, because there are a host of issues with that definition as well not being "one size fits all" either. </div><div><br></div><div>There are several viable definitions for a natural transformation depending on how general you want to get -- and this one (like the one in natural-transformation) conflates parametricity with naturality, so rapidly stops being good enough as you drift into PolyKinds and then start wanting a more accurate Category and Functor notions, which then force you to parameterize over the underlying `->` in the definition. <br><br>Both of these definitions occupy awkward suboptimal points in the design space, so I'd rather not see us locked into their use by enshrining either one in base.</div><div><br></div><div>-Edward</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 15, 2016 at 4:01 AM, Oleg Grenrus <span dir="ltr"><<a href="mailto:oleg.grenrus@iki.fi" target="_blank">oleg.grenrus@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">FWIW, i personally use `natural-transformation` library [1], which<div>provides this exact type alias, and also newtype around it (which is occasionally useful).</div><div><br></div><div>I’d rather promote the usage of the library (which has only `base` as dependency!).</div><div><div><br></div><div>- [1]: <a href="https://hackage.haskell.org/package/natural-transformation-0.3.1/docs/Control-Natural.html" target="_blank">https://hackage.haskell.<wbr>org/package/natural-<wbr>transformation-0.3.1/docs/<wbr>Control-Natural.html</a></div><div><br></div><div><div><div><blockquote type="cite"><div><div class="h5"><div>On 14 Nov 2016, at 20:11, Baldur Blöndal <<a href="mailto:baldurpet@gmail.com" target="_blank">baldurpet@gmail.com</a>> wrote:</div><br class="m_980575133945486206Apple-interchange-newline"></div></div><div><div><div class="h5"><div dir="ltr"><div>What the subject says, add<br><br></div>    type f ~> g = forall a. f a -> g a<br><div><br></div><div>to ‘base’. Further motivation (and arguments against) in GHC Trac ticket 12772 [1].<br></div><div><br>[1] <a href="https://ghc.haskell.org/trac/ghc/ticket/12772" target="_blank">https://ghc.haskell.org/trac/<wbr>ghc/ticket/12772</a><br></div></div></div></div><span class="">
______________________________<wbr>_________________<br>Libraries mailing list<br><a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br></span></div></blockquote></div><br></div></div></div></div><br>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>