23 Feb
2001
23 Feb
'01
8:32 a.m.
At 2001-02-22 20:54, Julian Assange wrote:
Is there a standard construct for something of this ilk:
unliftM :: Monad m a -> a
Assuming you mean "unliftM :: (Monad m) => m a -> a", I certainly hope not!!!
In this case, I need to construct a localised stateful computation
comp :: Int -> Int comp n = unliftM (do x <- ... return x)
The correct way to express this is: comp :: Int -> IO Int comp n = (do x <- ... return x) I think of "IO Int" meaning "instructions for an imperative action, that, if performed, would return an Int". That's quite different from an Int. -- Ashley Yakeley, Seattle WA Almost empty page: <http://semantic.org/>
9317
Age (days ago)
9317
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ashley Yakeley