X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FFamInst.lhs;h=e2da7952a92291d4cd6d8e1f7faa7a6650b218e3;hp=45de3f03924d5ea3ffb0ed76d5aa42986820b3a1;hb=d2ce0f52d42edf32bb9f13796e6ba6edba8bd516;hpb=1e50fd4185479a62e02d987bdfcb1c62712859ca diff --git a/compiler/typecheck/FamInst.lhs b/compiler/typecheck/FamInst.lhs index 45de3f0..e2da795 100644 --- a/compiler/typecheck/FamInst.lhs +++ b/compiler/typecheck/FamInst.lhs @@ -2,7 +2,7 @@ The @FamInst@ type: family instance heads \begin{code} module FamInst ( - checkFamInstConsistency, tcExtendLocalFamInstEnv + checkFamInstConsistency, tcExtendLocalFamInstEnv, tcGetFamInstEnvs ) where import HscTypes @@ -15,7 +15,7 @@ import Name import Module import SrcLoc import Outputable -import LazyUniqFM +import UniqFM import FiniteMap import FastString @@ -197,4 +197,17 @@ addFamInstLoc famInst thing_inside = setSrcSpan (mkSrcSpan loc loc) thing_inside where loc = getSrcLoc famInst +\end{code} + +\begin{code} + +tcGetFamInstEnvs :: TcM (FamInstEnv, FamInstEnv) +-- Gets both the external-package inst-env +-- and the home-pkg inst env (includes module being compiled) +tcGetFamInstEnvs + = do { eps <- getEps; env <- getGblEnv + ; return (eps_fam_inst_env eps, tcg_fam_inst_env env) + } + + \end{code}