[Haskell-cafe] special term describing f :: (Monad m) => (a -> m b)?

2004-12-14 Thread Derek Elkins
> 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

Well, formally, it's called a Kleisli arrow (or morphism).  A less
formal term commonly used for values of type a -> m b and m b, is
'computation' or'action' (though 'action' is usually used for the
specific case of IO). In "Notions of Computation and Monads"
Moggi calls them 'commands'.
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] special term describing f :: (Monad m) => (a -> m b) ?

2004-12-14 Thread Ralf Hinze
> 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
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] special term describing f :: (Monad m) => (a -> m b) ?

2004-12-14 Thread Robert Dockins
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.

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] special term describing f :: (Monad m) => (a -> m b) ?

2004-12-13 Thread Ralf Hinze
> 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
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] special term describing f :: (Monad m) => (a -> m b) ?

2004-12-13 Thread Henning Sato von Rosen
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
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe