Skip to content

Instantly share code, notes, and snippets.

@Icelandjack
Last active November 21, 2018 19:05
Show Gist options
  • Save Icelandjack/9e6902690a244286843164e554a8c3db to your computer and use it in GitHub Desktop.
Save Icelandjack/9e6902690a244286843164e554a8c3db to your computer and use it in GitHub Desktop.
Monoidal natural transformations / Applicative morphisms / Applicative functor morphism / Applicative transformation (used in Data.Foldable)

https://mail.haskell.org/pipermail/haskell-cafe/2010-November/086055.html

http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms

http://conal.net/blog/posts/another-lovely-example-of-type-class-morphisms

https://arxiv.org/pdf/1202.2919.pdf

eta (pure c) = pure c
eta (f <*> x) = eta f <*> eta x

Applicative (Sum f g): https://gist.github.com/Icelandjack/78542ddbdb622a48d8e60e14510cd7dd

Examples

In addition to these we have some uninteresting ones.

I don't think there are any transformations Maybe ~> (m, ) but there is (a unique?) one

a :: (m, ) ~> Maybe
a (_, m) = Just m
@Icelandjack
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment