Add a note why tcGetInstEnvs is duplicated.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 6 Nov 2014 04:57:03 +0000 (20:57 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Tue, 18 Nov 2014 05:29:52 +0000 (21:29 -0800)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
compiler/typecheck/TcEnv.lhs

index bcd6bfd..0ef74a1 100644 (file)
@@ -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) 
                        }