Monads Terminology Question
Hello, I'm wondering what the correct terminology is for the extra functions that we define with monads. For instance, State has get and put, Reader has ask and local, etc. Is there a good name for these? I've been calling them the "non-proper morphisms" (as opposed to the "proper" morphisms unit/return and bind). But I don't know if others call them that. Is there any accepted phrase for them? Thanks, ~Mark Snyder
I think these names are specific to each data type (which happens to be a monad) so unless they generalise, then they are not deserving of any special terminology than any other functions. While State and Reader are both Monads, they are also many other things such as Functor and Applicative (and perhaps more), so this doesn't require any special treatment. Mark Snyder wrote:
Hello,
I'm wondering what the correct terminology is for the extra functions that we define with monads. For instance, State has get and put, Reader has ask and local, etc. Is there a good name for these? I've been calling them the "non-proper morphisms" (as opposed to the "proper" morphisms unit/return and bind). But I don't know if others call them that. Is there any accepted phrase for them?
Thanks, ~Mark Snyder
------------------------------------------------------------------------
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
-- Tony Morris http://tmorris.net/
On 12 April 2010 10:39, Mark Snyder <muddsnyder@yahoo.com> wrote:
I'm wondering what the correct terminology is for the extra functions that we define with monads. For instance, State has get and put, Reader has ask and local, etc. Is there a good name for these? I've been calling them the "non-proper morphisms" (as opposed to the "proper" morphisms unit/return and bind). But I don't know if others call them that. Is there any accepted phrase for them?
I don't know about "accepted" but I've seen them called "effect basis" in the Unimo paper by Chuan-kai Lin: http://web.cecs.pdx.edu/~cklin/papers/unimo-icfp06.pdf For example he says: "The effect basis of the state monad consists of two computations: get, which retrieves the current state, and put s, which changes the current state to s." Cheers, Bernie.
participants (3)
-
Bernie Pope -
Mark Snyder -
Tony Morris