<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I think Mag, regex-applicative etc. examples are all reparable.
      The main culprit is however StateT and a like, as you pointed out.
      It's meaningless to discuss Mag if we cannot even write Functor m
      => Functor (StateT s m).<br>
      <br>
      > Coercible constraints aren't unpacked in data constructors<br>
      <br>
      Aren't they zero-width at run time? That's IMO a bug if that is
      not true.<br>
      <br>
      - Oleg<br>
    </p>
    <div class="moz-cite-prefix">On 3.1.2021 19.08, David Feuer wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMgWh9tj_hrzw3Xbara3JcZqqCsALkCyARv_cyw7DjdJFqitfQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">Mag uses the One it does for
        efficiency/compactness. Coercible constraints aren't unpacked in
        data constructors, sadly. If you're looking for more examples of
        slightly-invalid but useful Functors, the first place I'd check
        (beyond the very-Mag-like things in lens that inspired Mag) is
        Roman Cheplyaka's regex-applicative. I don't know if his lifts
        coercions or not (haven't looked in a while) but it does some
        similarly illegitimate things for good reasons.</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Sun, Jan 3, 2021, 12:03 PM
          Oleg Grenrus <<a href="mailto:oleg.grenrus@iki.fi"
            moz-do-not-send="true">oleg.grenrus@iki.fi</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div>
            <p>    Prelude Control.Monad.Trans.State> :i StateT<br>
                  type role StateT nominal representational nominal<br>
              <br>
              Note, `StateT` is nominal in last argument (a). Thus if
              (forall c d. Coercible ...) where a Functor superclass,
              Functor (and thus Monad) wouldn't be definable for StateT.
              That would be... unfortunate.<br>
              <br>
              Until there are "higher roles" Functor cannot be
              Coercible1. It would rule very simple code.<br>
              (OTOH Mag can be repaired,
              <a
href="https://oleg.fi/gists/posts/2019-07-31-fmap-coerce-coerce.html#functor-should-be-parametric"
                target="_blank" rel="noreferrer" moz-do-not-send="true">https://oleg.fi/gists/posts/2019-07-31-fmap-coerce-coerce.html#functor-should-be-parametric</a>).<br>
            </p>
            <p>- Oleg<br>
              <br>
            </p>
            <div>On 3.1.2021 18.31, Carter Schonwald wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>Hey David,</div>
                <div>could you exposit what would go wrong? a concrete
                  proof witness or explanation would help me a lot.
                  other people might benefit too.<br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>for the stateT s Maybe a, perhaps i'm still waking
                  up this AM, so let me try <br>
                </div>
                <div>newtype StateT s m a = StateT {runStateT :: s ->
                  m (a, s)}</div>
                <div><br>
                </div>
                <div>so this should expand to  <br>
                </div>
                <div>'(s -> Maybe (a,s)),'</div>
                <div> but the coerce would be on the 'a' here ... so i'm
                  not seeing the issue?<br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>the latter example seem to boil down to "a free
                  appplicative/functor Gadt" with some extra bits,
                  though i've not worked through to seeing the unsafety
                  <br>
                </div>
                <div>for the latter examples, the definitions are the
                  following : <br>
                </div>
                <div>
                  <pre><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090271"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090272"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090273"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090274"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090275"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#traverseBia" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>traverseBia</span></a></span><span> </span><span>::</span><span> </span><span>(</span><span><span>Traversable</span></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090275" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span>,</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Biapplicative" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Biapplicative</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090274" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span>)</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-132"></span><span>            </span><span>=></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090273" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090274" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090272" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090271" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>c</span></a></span><span>)</span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090275" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090273" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090274" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090275" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090272" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span>)</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090275" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090271" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>c</span></a></span><span>)</span></span></span></span></span></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-133"></span><span id="m_7365306672771404874m_5071564298494191785gmail-traverseBia"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#traverseBia" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>traverseBia</span></a></span></span><span> </span><span>=</span><span> </span><span><span>inline</span></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#traverseBiaWith" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>traverseBiaWith</span></a></span><span> </span><span><span>traverse</span></span><span>)</span><span>
 --------
<span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#traverseBiaWith" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>traverseBiaWith</span></a></span><span> </span><span>::</span><span> </span><span>forall</span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090289"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090289" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090288"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090288" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090285"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090285" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090284"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090284" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>c</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090287"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090287" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>s</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090286"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090286" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span></span><span>.</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Biapplicative" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Biapplicative</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090289" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-160"></span><span>  </span><span>=></span><span> </span><span>(</span><span>forall</span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090291"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090291" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>f</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090290"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090290" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span></span><span>.</span><span> </span><span><span>Applicative</span></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090291" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>f</span></a></span><span> </span><span>=></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090288" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090291" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>f</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090290" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span>)</span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090287" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>s</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090291" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>f</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090286" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090290" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span>)</span><span>)</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-161"></span><span>  </span><span>-></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090288" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090289" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090285" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090284" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>c</span></a></span><span>)</span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090287" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>s</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090289" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090286" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090285" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span>)</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090286" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090284" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>c</span></a></span><span>)</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-162"></span><span id="m_7365306672771404874m_5071564298494191785gmail-traverseBiaWith"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#traverseBiaWith" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>traverseBiaWith</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089877"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089877" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>trav</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089876"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089876" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089875"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089875" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>s</span></a></span></span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#smash" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>smash</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089876" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089877" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>trav</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#One" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>One</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089875" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>s</span></a></span><span>)
-------
<span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#smash" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>smash</span></a></span><span> </span><span>::</span><span> </span><span>forall</span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090262"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090262" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090258"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090258" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090261"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090261" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090260"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090260" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090259"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090259" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>c</span></a></span></span><span>.</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Biapplicative" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Biapplicative</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090262" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-166"></span><span>      </span><span>=></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090261" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090262" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090260" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090259" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>c</span></a></span><span>)</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-167"></span><span>      </span><span>-></span><span> </span><span>(</span><span>forall</span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090264"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090264" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span></span><span>.</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090261" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090264" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090258" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090264" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span>)</span><span>)</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-168"></span><span>      </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090262" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090258" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090260" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span>)</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090258" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090259" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>c</span></a></span><span>)</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-169"></span><span id="m_7365306672771404874m_5071564298494191785gmail-smash"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#smash" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>smash</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089872"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089872" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089871"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089871" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>m</span></a></span></span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089871" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>m</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089871" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>m</span></a></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-170"></span><span>  </span><span>where</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-171"></span><span>    </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span>::</span><span> </span><span>forall</span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090249"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090249" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090248"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090248" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>y</span></a></span></span><span>.</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090261" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090260" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090249" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090261" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090259" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>c</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090248" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>y</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090262" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090249" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090248" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>y</span></a></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-172"></span><span>    </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089870"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Pure" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Pure</span></a></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089868"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089868" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span></span><span>)</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Pure" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Pure</span></a></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089867"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089867" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>u</span></a></span></span><span>)</span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#bipure" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>bipure</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089868" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089867" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>u</span></a></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-173"></span><span>    </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Map" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Map</span></a></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089865"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089865" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>f</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089864"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089864" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span></span><span>)</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Map" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Map</span></a></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089863"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089863" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>g</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089862"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089862" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>y</span></a></span></span><span>)</span><span> </span><span>=</span><span> </span><span><span>bimap</span></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089865" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>f</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089863" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>g</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089864" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089862" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>y</span></a></span><span>)</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-174"></span><span>    </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Ap" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Ap</span></a></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089860"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089860" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>fs</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089859"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089859" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>xs</span></a></span></span><span>)</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Ap" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Ap</span></a></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089858"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089858" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>gs</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089857"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089857" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>ys</span></a></span></span><span>)</span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089860" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>fs</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089858" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>gs</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#%3C%3C%2A%3E%3E" target="_blank" rel="noreferrer" moz-do-not-send="true"><span><<*>></span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089859" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>xs</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089857" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>ys</span></a></span><span>
#if MIN_VERSION_base(4,10,0)
</span><span>    </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#LiftA2" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>LiftA2</span></a></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089855"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089855" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>f</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089854"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089854" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>xs</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089853"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089853" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>ys</span></a></span></span><span>)</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#LiftA2" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>LiftA2</span></a></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089852"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089852" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>g</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089851"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089851" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>zs</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089850"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089850" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>ws</span></a></span></span><span>)</span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#biliftA2" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>biliftA2</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089855" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>f</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089852" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>g</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089854" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>xs</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089851" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>zs</span></a></span><span>)</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089853" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>ys</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089850" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>ws</span></a></span><span>)</span><span>
#endif
</span><span>    </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#One" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>One</span></a></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089849"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089849" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span></span><span>)</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#One" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>One</span></a></span><span> </span><span><span>_</span></span><span>)</span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089872" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>p</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089849" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-179"></span><span>    </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089870" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>go</span></a></span><span> </span><span><span>_</span></span><span> </span><span><span>_</span></span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#impossibleError" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>impossibleError</span></a></span><span>

</span></span></span></pre>
                  <pre><span><span><span>---- and then the magma is 
<span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-187"></span><span>-- This is used to reify a traversal for 'traverseBia'. It's a somewhat</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-188"></span><span>-- bogus 'Functor' and 'Applicative' closely related to 'Magma' from the</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-189"></span><span>-- @lens@ package. Valid traversals don't use (<$), (<*), or (*>), so</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-190"></span><span>-- we leave them out. We offer all the rest of the Functor and Applicative</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-191"></span><span>-- operations to improve performance: we generally want to keep the structure</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-192"></span><span>-- as small as possible. We might even consider using RULES to widen lifts</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-193"></span><span>-- when we can:</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-194"></span><span>--</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-195"></span><span>--   liftA2 f x y <*> z ==> liftA3 f x y z,</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-196"></span><span>--</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-197"></span><span>-- etc., up to the pointer tagging limit. But we do need to be careful. I don't</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-198"></span><span>-- *think* GHC will ever inline the traversal into the go function (because that</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-199"></span><span>-- would duplicate work), but if it did, and if different RULES fired for the</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-200"></span><span>-- two copies, everything would break horribly.</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-201"></span><span>--</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-202"></span><span>-- Note: if it's necessary for some reason, we *could* relax GADTs to</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-203"></span><span>-- ExistentialQuantification by changing the type of One to</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-204"></span><span>--</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-205"></span><span>--   One :: (b -> c) -> a -> Mag a b c</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-206"></span><span>--</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-207"></span><span>-- where the function will always end up being id. But we allocate a *lot*</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-208"></span><span>-- of One constructors, so this would definitely be bad for performance.</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-209"></span><span>data</span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-Mag"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089846"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089846" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089845"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089845" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span></span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089844"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089844" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span></span><span> </span><span>where</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-210"></span><span>  </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090195"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090196"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090197"><span id="m_7365306672771404874m_5071564298494191785gmail-Pure"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Pure" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Pure</span></a></span></span><span> </span><span>::</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090197" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090196" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090195" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090197" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span></span></span></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-211"></span><span>  </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089843"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090216"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090217"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090218"><span id="m_7365306672771404874m_5071564298494191785gmail-Map"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Map" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Map</span></a></span></span><span> </span><span>::</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089843" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090218" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span>)</span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090217" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090216" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089843" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>x</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090217" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090216" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090218" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span></span></span></span></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-212"></span><span>  </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089839"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089840"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089841"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089842"><span id="m_7365306672771404874m_5071564298494191785gmail-Ap"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Ap" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Ap</span></a></span></span><span> </span><span>::</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089842" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089841" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089840" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089839" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>u</span></a></span><span>)</span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089842" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089841" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089840" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089842" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089841" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089839" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>u</span></a></span></span></span></span></span><span>
#if MIN_VERSION_base(4,10,0)
</span><span>  </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089837"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089838"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090185"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090186"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090187"><span id="m_7365306672771404874m_5071564298494191785gmail-LiftA2"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#LiftA2" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>LiftA2</span></a></span></span><span> </span><span>::</span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089838" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089837" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>u</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090187" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>v</span></a></span><span>)</span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090186" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090185" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089838" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>t</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090186" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090185" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089837" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>u</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090186" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090185" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090187" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>v</span></a></span></span></span></span></span></span><span>
#endif
</span><span>  </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090255"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679090256"><span id="m_7365306672771404874m_5071564298494191785gmail-One"><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#One" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>One</span></a></span></span><span> </span><span>::</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090256" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span>-></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090256" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090255" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679090255" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span></span></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-217"></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-218"></span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089835"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089836"><span>instance</span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089832"><span><span>Functor</span></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089836" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089835" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span>)</span></span><span> </span><span>where</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-219"></span><span>  </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089830"><span><span>fmap</span></span></span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Map" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Map</span></a></span></span></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-220"></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-221"></span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089828"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089829"><span>instance</span><span> </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089820"><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089822"><span><span>Applicative</span></span><span> </span><span>(</span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Mag" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Mag</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089829" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>a</span></a></span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#local-6989586621679089828" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>b</span></a></span><span>)</span></span></span><span> </span><span>where</span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-222"></span><span>  </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089818"><span><span>pure</span></span></span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Pure" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Pure</span></a></span><span>
</span><span id="m_7365306672771404874m_5071564298494191785gmail-line-223"></span><span>  </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089817"><span><span>(<*>)</span></span></span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#Ap" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>Ap</span></a></span><span>
#if MIN_VERSION_base(4,10,0)
</span><span>  </span><span id="m_7365306672771404874m_5071564298494191785gmail-local-6989586621679089816"><span><span>liftA2</span></span></span><span> </span><span>=</span><span> </span><span><a href="https://hackage.haskell.org/package/bifunctors-5.5.9/docs/src/Data.Biapplicative.html#LiftA2" target="_blank" rel="noreferrer" moz-do-not-send="true"><span>LiftA2</span></a></span></span></span><span>
#endif
</span><span></span></span></span></span></pre>
                  <pre><span><span>

</span><span></span></span></pre>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Sun, Jan 3, 2021 at
                  11:09 AM David Feuer <<a
                    href="mailto:david.feuer@gmail.com" target="_blank"
                    rel="noreferrer" moz-do-not-send="true">david.feuer@gmail.com</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">
                  <div dir="auto">You're not being very imaginative at
                    all. Try out, oh, `StateT s Maybe`. Or play around
                    with a nice fake functor like the magma used to
                    implement `traverseBia` in `bifunctors`—pretty sure
                    that won't work out.</div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">On Sun, Jan 3,
                      2021, 11:00 AM Carter Schonwald <<a
                        href="mailto:carter.schonwald@gmail.com"
                        target="_blank" rel="noreferrer"
                        moz-do-not-send="true">carter.schonwald@gmail.com</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">
                      <div dir="ltr">
                        <div>Hey everyone!</div>
                        <div><br>
                        </div>
                        <div>for context, I have some code where I was
                          seeing how far coerce lets me go to avoid
                          doing wrappers for certain codes,</div>
                        <div><br>
                        </div>
                        <div>i found i had to write the following
                          (mapping an operation over to its newtyped
                          sibling)<br>
                        </div>
                        <div><br>
                        </div>
                        <div>```</div>
                        <div>-- > :t QRA.wither</div>
                        <div>--- forall a b f . Applicative f => (a
                          -> f (Maybe b)) -> RAList a -> f
                          (RAList b)</div>
                        <div>---<br>
                        </div>
                        <div>wither :: forall a b f . (Applicative f,
                          (forall c d .  Coercible c d => Coercible
                          (f c) (f d))  ) =><br>
                                  (a -> f (Maybe b)) -> RAList a
                          -> f (RAList b)<br>
                          wither = \f la ->    coerce     $
                          QRA.wither f $ coerce la</div>
                        <div>```</div>
                        <div><br>
                        </div>
                        <div>i'd much rather be able to write <br>
                        </div>
                        <div>```</div>
                        <div>wither :: forall a b f . (Applicative f)
                          =><br>
                                  (a -> f (Maybe b)) -> RAList a
                          -> f (RAList b)<br>
                          wither = \f la ->    coerce     $
                          QRA.wither f $ coerce la</div>
                        <div>```<br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>this seems like it'd be best done via
                          something like changing the functor class
                          definition to <br>
                        </div>
                        <div><br>
                        </div>
                        <div>```<br>
                        </div>
                        <div>class (forall c d .  Coercible c d =>
                          Coercible (f c) (f d))  ) => Functor f
                          where ..<br>
                        </div>
                        <div>```</div>
                        <div><br>
                        </div>
                        <div>is there any specific reason why this is
                          not feasible? I cant think of a GADT where
                          this wouldn't be totally safe to do (because
                          unlike in foldable, f is in both the domain
                          and co-domain), but maybe i'm not being
                          imaginative enough?</div>
                        <div><br>
                        </div>
                        <div>look forward to learning what our obstacles
                          are to making this happen for ghc 9.2 :) <br>
                        </div>
                        <div><br>
                        </div>
                        <div>-Carter<br>
                        </div>
                        <div><br>
                        </div>
                      </div>
                      _______________________________________________<br>
                      Libraries mailing list<br>
                      <a href="mailto:Libraries@haskell.org"
                        rel="noreferrer noreferrer" target="_blank"
                        moz-do-not-send="true">Libraries@haskell.org</a><br>
                      <a
                        href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries"
                        rel="noreferrer noreferrer noreferrer"
                        target="_blank" moz-do-not-send="true">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
                    </blockquote>
                  </div>
                </blockquote>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
Libraries mailing list
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer" moz-do-not-send="true">Libraries@haskell.org</a>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank" rel="noreferrer" moz-do-not-send="true">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a>
</pre>
            </blockquote>
          </div>
          _______________________________________________<br>
          Libraries mailing list<br>
          <a href="mailto:Libraries@haskell.org" target="_blank"
            rel="noreferrer" moz-do-not-send="true">Libraries@haskell.org</a><br>
          <a
            href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>