Refactoring and tidyup of HscMain and related things (also fix #1666)
[ghc-hetmet.git] / compiler / utils / MonadUtils.hs
index dc54620..75a88df 100644 (file)
@@ -27,16 +27,16 @@ module MonadUtils
 
 import Outputable 
 
 
 import Outputable 
 
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 -- Detection of available libraries
 -- Detection of available libraries
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 
 -- we don't depend on MTL for now
 #define HAVE_MTL 0
 
 
 -- we don't depend on MTL for now
 #define HAVE_MTL 0
 
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 -- Imports
 -- Imports
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 
 import Maybes
 
 
 import Maybes
 
@@ -47,9 +47,9 @@ import Control.Monad.Trans
 import Control.Monad
 import Control.Monad.Fix
 
 import Control.Monad
 import Control.Monad.Fix
 
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 -- The ID monad
 -- The ID monad
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 
 newtype ID a = ID a
 instance Monad ID where
 
 newtype ID a = ID a
 instance Monad ID where
@@ -61,9 +61,9 @@ instance Monad ID where
 runID :: ID a -> a
 runID (ID x) = x
 
 runID :: ID a -> a
 runID (ID x) = x
 
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 -- MTL
 -- MTL
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 
 #if !HAVE_MTL
 
 
 #if !HAVE_MTL
 
@@ -73,10 +73,10 @@ class Monad m => MonadIO m where
 instance MonadIO IO where liftIO = id
 #endif
 
 instance MonadIO IO where liftIO = id
 #endif
 
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 -- Lift combinators
 --  These are used throughout the compiler
 -- Lift combinators
 --  These are used throughout the compiler
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 
 -- | Lift an 'IO' operation with 1 argument into another monad
 liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b
 
 -- | Lift an 'IO' operation with 1 argument into another monad
 liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b
@@ -94,10 +94,10 @@ liftIO3 = ((.).((.).(.))) liftIO
 liftIO4 :: MonadIO m => (a -> b -> c -> d -> IO e) -> a -> b -> c -> d -> m e
 liftIO4 = (((.).(.)).((.).(.))) liftIO
 
 liftIO4 :: MonadIO m => (a -> b -> c -> d -> IO e) -> a -> b -> c -> d -> m e
 liftIO4 = (((.).(.)).((.).(.))) liftIO
 
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 -- Common functions
 --  These are used throughout the compiler
 -- Common functions
 --  These are used throughout the compiler
-----------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 
 zipWith3M :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m [d]
 zipWith3M _ []     _      _      = return []
 
 zipWith3M :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m [d]
 zipWith3M _ []     _      _      = return []