special term describing f :: (Monad m) => (a -> m b) ?

What is a function of the followning type called: f :: (Monad m) => (a -> m b) Is there a special term describing such a function (a function into a monad)? For f in a >>= f is en example. Need it for an article/report. Regards/Henning

What is a function of the followning type called:
f :: (Monad m) => (a -> m b)
Is there a special term describing such a function (a function into a monad)?
It is often called a procedure or an effectful function (I assume that `a' and `b' are not meant to be universally quantified). I sometimes use a special arrow -|> for this type. Cheers, Ralf

Ralf Hinze wrote:
What is a function of the followning type called:
f :: (Monad m) => (a -> m b)
Is there a special term describing such a function (a function into a monad)?
It is often called a procedure or an effectful function (I assume that `a' and `b' are not meant to be universally quantified). I sometimes use a special arrow -|> for this type.
Cheers, Ralf
I can understand how calling this kind of function "effectual" makes sense in the "magic" IO monad, or perhaps even in the ST and State monads, because the term seems to imply side-effects. However, it is a misnomer for eg, the Error, List and Cont monads. Most (all but IO) monads are actually just ways of simplifying the expression of truly pure functions. It seems to me that terms like "procedure" and "effectual function" blur the distinction between the special IO monad and all the others. I think this is an important point, because many people new to Haskell are confused about what monads are and how they work; it is generally some time before they realize that IO is special and begin to understand how the other monads fit in. I think we would do a disservice to perpetuate terminology which encourages this misperception. Unfortunatly, I don't have a better idea. Perhaps someone more clever than I can invent/find a term which captures the relavant concept.

I can understand how calling this kind of function "effectual" makes sense in the "magic" IO monad, or perhaps even in the ST and State monads, because the term seems to imply side-effects. However, it is a misnomer for eg, the Error, List and Cont monads.
It depends a bit on how wide you interpret the term "effectfull". For me, exceptions or partiality (Error), non-determinisms or backtracking (List) and continuations (Cont) are certainly effects. Cheers, Ralf
participants (3)
-
Henning Sato von Rosen
-
Ralf Hinze
-
Robert Dockins