Don't hardwire PA and PR dfuns in the vectoriser
[ghc-hetmet.git] / compiler / deSugar / DsMonad.lhs
index e275cb9..11be59c 100644 (file)
@@ -25,6 +25,8 @@ module DsMonad (
 
        DsMetaEnv, DsMetaVal(..), dsLookupMetaEnv, dsExtendMetaEnv,
 
+        dsLoadModule,
+
        -- Warnings
        DsWarning, warnDs, failWithDs,
 
@@ -38,6 +40,7 @@ import TcRnMonad
 import CoreSyn
 import HsSyn
 import TcIface
+import LoadIface
 import RdrName
 import HscTypes
 import Bag
@@ -318,3 +321,14 @@ dsExtendMetaEnv :: DsMetaEnv -> DsM a -> DsM a
 dsExtendMetaEnv menv thing_inside
   = updLclEnv (\env -> env { ds_meta = ds_meta env `plusNameEnv` menv }) thing_inside
 \end{code}
+
+\begin{code}
+dsLoadModule :: SDoc -> Module -> DsM ()
+dsLoadModule doc mod
+  = do { env <- getGblEnv
+       ; setEnvs (ds_if_env env)
+                 (loadSysInterface doc mod)
+       ; return ()
+       }
+\end{code}
+