summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2014-11-05 20:57:03 -0800
committerEdward Z. Yang <ezyang@cs.stanford.edu>2014-11-17 21:29:52 -0800
commitb9096df6a9733e38e15361e79973ef5659fc5c22 (patch)
treeaabbb57fe9d070b33b8134e0b5c8ed0686c3974c
parent44f1582e99e3ca6710279e3dacea91d4166ecec6 (diff)
downloadhaskell-b9096df6a9733e38e15361e79973ef5659fc5c22.tar.gz
Add a note why tcGetInstEnvs is duplicated.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
-rw-r--r--compiler/typecheck/TcEnv.lhs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/typecheck/TcEnv.lhs b/compiler/typecheck/TcEnv.lhs
index bcd6bfdf82..0ef74a1f5a 100644
--- a/compiler/typecheck/TcEnv.lhs
+++ b/compiler/typecheck/TcEnv.lhs
@@ -224,7 +224,8 @@ tcLookupInstance cls tys
where
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)
}