[make fixer routines work in any MonadIO
John Meacham <john@repetae.net>**20060125025402] hunk ./Fixer/Fixer.hs 22
+import Control.Monad.Trans
hunk ./Fixer/Fixer.hs 46
-newFixer :: IO Fixer
-newFixer = do
+newFixer :: MonadIO m => m Fixer
+newFixer = liftIO $ do
hunk ./Fixer/Fixer.hs 89
-newValue :: Fixable a => Fixer -> a -> IO (Value a)
-newValue fixer@Fixer { vars = vars } v = do
+newValue :: (MonadIO m,Fixable a) => Fixer -> a -> m (Value a)
+newValue fixer@Fixer { vars = vars } v = liftIO $ do
hunk ./Fixer/Fixer.hs 110
-addRule :: Rule -> IO ()
-addRule (Rule act) = act
+addRule :: MonadIO m => Rule -> m ()
+addRule (Rule act) = liftIO act
hunk ./Fixer/Fixer.hs 144
-readValue :: Value a -> IO a
-readValue (IV v) = readIORef (current v)
+readValue :: MonadIO m => Value a -> m a
+readValue (IV v) = liftIO $ readIORef (current v)
hunk ./Fixer/Fixer.hs 149
-findFixpoint :: Fixer -> IO ()
-findFixpoint Fixer { vars = vars, todo = todo } = do
+findFixpoint :: MonadIO m => Fixer -> m ()
+findFixpoint Fixer { vars = vars, todo = todo } = liftIO $ do
hunk ./Fixer/Supply.hs 8
-import Fixer.Fixer
-import qualified Data.Map as Map
+import Control.Monad.Trans
hunk ./Fixer/Supply.hs 11
+import Fixer.Fixer
+import qualified Data.Map as Map
hunk ./Fixer/Supply.hs 21
-newSupply :: Fixer -> IO (Supply b a)
-newSupply fixer = do
+newSupply :: MonadIO m => Fixer -> m (Supply b a)
+newSupply fixer = liftIO $ do
hunk ./Fixer/Supply.hs 26
-supplyValue :: (Ord b, Fixable a) => Supply b a -> b -> IO (Value a)
-supplyValue (Supply fixer ref) b = do
+supplyValue :: (MonadIO m, Ord b, Fixable a) => Supply b a -> b -> m (Value a)
+supplyValue (Supply fixer ref) b = liftIO $ do
hunk ./Fixer/Supply.hs 36
-supplyReadValues :: Supply b a -> IO [(b,a)]
-supplyReadValues (Supply _fixer ref) = do
+supplyReadValues :: MonadIO m => Supply b a -> m [(b,a)]
+supplyReadValues (Supply _fixer ref) = liftIO $ do