monad library

Iavor Diatchki diatchki@cse.ogi.edu
Wed, 30 Jul 2003 17:31:53 +0000


hello,

Andrew J Bromage wrote:
> G'day all.
> 
> On Sun, Jul 27, 2003 at 09:28:57PM +0200, Iavor Diatchki wrote:
> 
> 
>>in my other library i had a similar operation, corresponding to 
>>the fact that most monad transformers are functors on the category of 
>>monads.  it works for all transformers except for continuations:
>>
>>class MondaTrans t => MapTrans t where
>>  mapTrans :: (Monad m, Monad n) => (forall a. m a -> n a) -> t m b -> 
>>t n b
>>
>>intuitively the "forall" constraint says that we are changing just the 
>>monad, and not touching the value. to get continuations to work, one 
>>needs a map (n a -> m a) as well, i think.   any comments about that class?
> 
> 
> Looks pretty good to me, though I still don't like the name.
we could change it but to what?

bye
iavor




-- 
==================================================
| Iavor S. Diatchki, Ph.D. student               |
| Department of Computer Science and Engineering |
| School of OGI at OHSU                          |
| http://www.cse.ogi.edu/~diatchki               |
==================================================