[commit: ghc] master: Add a note why tcGetInstEnvs is duplicated. (b9096df)

git at git.haskell.org git at git.haskell.org
Tue Nov 18 05:29:46 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b9096df6a9733e38e15361e79973ef5659fc5c22/ghc

>---------------------------------------------------------------

commit b9096df6a9733e38e15361e79973ef5659fc5c22
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Wed Nov 5 20:57:03 2014 -0800

    Add a note why tcGetInstEnvs is duplicated.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>


>---------------------------------------------------------------

b9096df6a9733e38e15361e79973ef5659fc5c22
 compiler/typecheck/TcEnv.lhs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler/typecheck/TcEnv.lhs b/compiler/typecheck/TcEnv.lhs
index bcd6bfd..0ef74a1 100644
--- a/compiler/typecheck/TcEnv.lhs
+++ b/compiler/typecheck/TcEnv.lhs
@@ -225,6 +225,7 @@ tcLookupInstance cls tys
         extractTyVar (TyVarTy tv) = tv
         extractTyVar _            = panic "TcEnv.tcLookupInstance: extractTyVar"
 
+    -- NB: duplicated to prevent circular dependence on Inst
     tcGetInstEnvs = do { eps <- getEps; env <- getGblEnv;
                        ; return (eps_inst_env eps, tcg_inst_env env) 
                        }



More information about the ghc-commits mailing list