Fix Trac #2856: make deriving work for type families
[ghc-hetmet.git] / compiler / typecheck / TcRnDriver.lhs
index e0d8632..6d2d34a 100644 (file)
@@ -823,7 +823,7 @@ tcTopSrcDecls boot_details
 
                -- Second pass over class and instance declarations, 
         traceTc (text "Tc6") ;
-       (inst_binds, tcl_env)     <- setLclTypeEnv tcl_env $ tcInstDecls2 tycl_decls inst_infos ;
+       (inst_binds, tcl_env) <- setLclTypeEnv tcl_env $ tcInstDecls2 tycl_decls inst_infos ;
        showLIE (text "after instDecls2") ;
 
                -- Foreign exports
@@ -877,7 +877,7 @@ check_main dflags tcg_env
    return tcg_env
 
  | otherwise
- = do  { mb_main <- lookupSrcOcc_maybe main_fn
+ = do  { mb_main <- lookupGlobalOccRn_maybe main_fn
                -- Check that 'main' is in scope
                -- It might be imported from another module!
        ; case mb_main of {