X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnSource.lhs;h=70c995748c24fd174d406e68d8983c4132771797;hb=30c122df62ec75f9ed7f392f24c2925675bf1d06;hp=1cb222336722df6f18ec79b4f8c99154041c7f35;hpb=28f7bda61e5f3b2a8e3711ee1f93e863ecb7620b;p=ghc-hetmet.git diff --git a/compiler/rename/RnSource.lhs b/compiler/rename/RnSource.lhs index 1cb2223..70c9957 100644 --- a/compiler/rename/RnSource.lhs +++ b/compiler/rename/RnSource.lhs @@ -46,9 +46,10 @@ import Class ( FunDep ) import Name ( Name, nameOccName ) import NameSet import NameEnv -import UniqFM +import LazyUniqFM import OccName import Outputable +import FastString import SrcLoc ( Located(..), unLoc, noLoc ) import DynFlags ( DynFlag(..) ) import Maybe ( isNothing ) @@ -59,6 +60,27 @@ import ListSetOps (findDupsEq, mkLookupFun) import Control.Monad \end{code} +\begin{code} +-- XXX +thenM :: Monad a => a b -> (b -> a c) -> a c +thenM = (>>=) + +thenM_ :: Monad a => a b -> a c -> a c +thenM_ = (>>) + +returnM :: Monad m => a -> m a +returnM = return + +mappM :: (Monad m) => (a -> m b) -> [a] -> m [b] +mappM = mapM + +mappM_ :: (Monad m) => (a -> m b) -> [a] -> m () +mappM_ = mapM_ + +checkM :: Monad m => Bool -> m () -> m () +checkM = unless +\end{code} + @rnSourceDecl@ `renames' declarations. It simultaneously performs dependency analysis and precedence parsing. It also does the following error checks: