Re-jig simplifySuperClass (again)
[ghc-hetmet.git] / compiler / deSugar / DsMonad.lhs
index 11be59c..1238b1a 100644 (file)
@@ -9,7 +9,7 @@
 module DsMonad (
        DsM, mapM, mapAndUnzipM,
        initDs, initDsTc, fixDs,
-       foldlM, foldrM, ifOptM,
+       foldlM, foldrM, ifDOptM, unsetOptM,
        Applicative(..),(<$>),
 
        newLocalName,
@@ -72,7 +72,6 @@ import Data.IORef
 \begin{code}
 data DsMatchContext
   = DsMatchContext (HsMatchContext Name) SrcSpan
-  | NoMatchContext
   deriving ()
 
 data EquationInfo
@@ -221,8 +220,8 @@ it easier to read debugging output.
 
 \begin{code}
 -- Make a new Id with the same print name, but different type, and new unique
-newUniqueId :: Name -> Type -> DsM Id
-newUniqueId id = mkSysLocalM (occNameFS (nameOccName id))
+newUniqueId :: Id -> Type -> DsM Id
+newUniqueId id = mkSysLocalM (occNameFS (nameOccName (idName id)))
 
 duplicateLocalDs :: Id -> DsM Id
 duplicateLocalDs old_local 
@@ -327,8 +326,7 @@ dsLoadModule :: SDoc -> Module -> DsM ()
 dsLoadModule doc mod
   = do { env <- getGblEnv
        ; setEnvs (ds_if_env env)
-                 (loadSysInterface doc mod)
-       ; return ()
+                 (loadSysInterface doc mod >> return ())
        }
 \end{code}