[Clean up some stuff dealing with src locations and error messages in the front end
John Meacham <john@repetae.net>**20060228025242] hunk ./FrontEnd/HsErrors.hs 5
-module HsErrors where
+module FrontEnd.HsErrors where
hunk ./FrontEnd/HsErrors.hs 21
+    hsQualType (hsTypeType x)
+hsType x@HsTyExists {} = do
+    err "h98-forall" "Explicit quantification is a non-haskell98 feature"
hunk ./FrontEnd/Rename.hs 81
-import HsErrors
+import FrontEnd.HsErrors as HsErrors
hunk ./FrontEnd/SrcLoc.hs 49
+
+
+-----------------------
+-- srcloc monad classes
+-----------------------
+
+class Monad m => MonadSrcLoc m where
+    getSrcLoc  :: m SrcLoc
+    getSrcSpan :: m SrcSpan
+    getSrcSpan = getSrcLoc >>= return . srcSpan
+    getSrcLoc = getSrcSpan >>= return . srcLoc
+
+
+class MonadSrcLoc m => MonadSetSrcLoc m where
+    withSrcLoc :: SrcLoc -> m a -> m a
+    withSrcSpan :: SrcSpan -> m a -> m a
+    withSrcLoc sl a = withSrcSpan (srcSpan sl) a
+    withSrcSpan ss a = withSrcLoc (srcLoc ss) a
+
+withLocation :: (HasLocation l,MonadSetSrcLoc m) => l -> m a -> m a
+withLocation l = withSrcSpan (srcSpan l)
hunk ./FrontEnd/Tc/Monad.hs 60
-import FrontEnd.SrcLoc(bogusASrcLoc)
+import FrontEnd.SrcLoc(bogusASrcLoc,MonadSrcLoc(..))
hunk ./FrontEnd/TypeSynonyms.hs 20
-import HsErrors
+import FrontEnd.HsErrors
hunk ./FrontEnd/Warning.hs 1
-module Warning(Warning(..), MonadWarn(..), MonadSrcLoc(..), processErrors, warn, warnF, err, addDiag, addWarn, processIOErrors, printIOErrors) where
+module Warning(Warning(..), MonadWarn(..), processErrors, warn, warnF, err, addDiag, addWarn, processIOErrors, printIOErrors) where
hunk ./FrontEnd/Warning.hs 20
-class Monad m => MonadSrcLoc m where
-    getSrcLoc :: m SrcLoc