
12 Oct
2004
12 Oct
'04
1:45 p.m.
Dear All, List and IO are both monads when appropriate operations are defined. The IO monad, which is a one-way monad, does not have a function of type IO a -> a, in general, except an unsafe function "unsafePerformIO :: IO a -> a". A two-way monad, such as List, has such a function "head :: [a] -> a". My rough question is: Is there any intersting theory on the relationship between one-way monads and two-way monads? For example, a restriction on the IO monad would offer a *safe* "unsafePerformIO", and so the IO monad would become a two-way monad. Does this question make sense at all? Thanks in advance. Kwanghoon Choi