<div dir="ltr"><div>huh, that looks neat, i'll have to check it out when i have time.</div><div><br></div>I'd actually argue that the paper by Sam Lindley, Philip Wadler and Jeremy Yallop is another interesting take<div>

<a href="http://homepages.inf.ed.ac.uk/wadler/papers/arrows-and-idioms/arrows-and-idioms.pdf">http://homepages.inf.ed.ac.uk/wadler/papers/arrows-and-idioms/arrows-and-idioms.pdf</a><br></div><div><br></div><div>therein, the authors relate Applicatives, Monads and Arrows and their respective expressivity in a categorical setting</div>

<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 5, 2014 at 10:57 AM, Mike Izbicki <span dir="ltr"><<a href="mailto:mike@izbicki.me" target="_blank">mike@izbicki.me</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a github repo called subhask that does this.  It uses the<br>
ConstraintKinds extension and some other tricks to let us work in<br>
subcategories of hask, and build endofunctors, applicatives, and<br>
monads in those categories.  My particular application is building a<br>
dsl for machine learning, so there's a category for linear maps, and a<br>
category for lipschitz maps, among many others.  (Normal distributions<br>
are monads in the category Vect, and most metric-based algorithms are<br>
monads in the category of lipshitz maps.)  It's not quite ready for<br>
release, but you can check out the in progress work if you want.<br>
<br>
The most interesting bits for you are probably the category instances:<br>
<a href="https://github.com/mikeizbicki/subhask/blob/master/src/SubHask/Category.hs" target="_blank">https://github.com/mikeizbicki/subhask/blob/master/src/SubHask/Category.hs</a><br>
<br>
and the monad hierarchy:<br>
<a href="https://github.com/mikeizbicki/subhask/blob/master/src/SubHask/Functor.hs" target="_blank">https://github.com/mikeizbicki/subhask/blob/master/src/SubHask/Functor.hs</a><br>
<br>
The monad definitions currently lack adequate documentation because<br>
some things will still have to change to get the type checker to do<br>
what I want.  For example, do notation doesn't work properly yet in<br>
some subcategories.<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Aug 5, 2014 at 1:46 AM, Ruben Astudillo <<a href="mailto:ruben.astud@gmail.com">ruben.astud@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I recently came across of two blog posts[1][2] by Gabriel Gonzales where he<br>
> shows motivation for writing compositional functions -- and thus why the concept<br>
> of category is useful -- and motivation to write functors between them.<br>
><br>
> I wanted to know if something similar for has been done to `Applicative' and<br>
> `Monad' as design pattern and interaction between categories. I've searching but<br>
> I always hit the Monad tutorials and more info on how to use them.<br>
><br>
> Thanks in advance. Excuse my English.<br>
><br>
> [1]: <a href="http://www.haskellforall.com/2012/08/the-category-design-pattern.html" target="_blank">http://www.haskellforall.com/2012/08/the-category-design-pattern.html</a><br>
> [2]: <a href="http://www.haskellforall.com/2012/09/the-functor-design-pattern.html" target="_blank">http://www.haskellforall.com/2012/09/the-functor-design-pattern.html</a><br>
><br>
> --<br>
> Ruben Astudillo. pgp: 0x3C332311 , usala en lo posible :-)<br>
> Crear un haiku, en diecisiete silabas, es complica...<br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>