[Haskell-cafe] Haskell function composition commutivity?

Galaxy Being borgauf at gmail.com
Tue Apr 13 19:19:46 UTC 2021


Your answers seem to originate outside of normal Haskell tutorials. Where
can I start with this higher superset theory?

On Tue, Apr 13, 2021 at 1:19 PM Viktor Dukhovni <ietf-dane at dukhovni.org>
wrote:

> > On Apr 13, 2021, at 2:02 PM, Tom Smeding <x at tomsmeding.com> wrote:
> >
> > Although, because of the fact that you omitted 'Functor f =>' and
> > instead chose to write the constraint in prose beforehand, I get the
> > feeling that you may be speaking mathematically, not about Haskell as
> > compiled by GHC.
>
> Yes, mathematically, with Haskell-like syntax.  Also the
> functors in question were intended to stand for specific
> functors, rather than be universally quantified.
>
> So perhaps better:
>
>   Yoneda (with A some type and F some functor):
>
>         foo :: forall b. (A -> b) -> F b
>
>     <=> foo bar = fmap bar (foo (id @A)
>
> --
>         Viktor.
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210413/df0f1f2d/attachment.html>


More information about the Haskell-Cafe mailing list