[project @ 2001-11-23 15:43:39 by simonmar]
authorsimonmar <unknown>
Fri, 23 Nov 2001 15:43:39 +0000 (15:43 +0000)
committersimonmar <unknown>
Fri, 23 Nov 2001 15:43:39 +0000 (15:43 +0000)
unbreak tcModule.

ghc/compiler/typecheck/TcModule.lhs

index e799f09..4a34cba 100644 (file)
@@ -395,8 +395,9 @@ tcModule pcs hst get_fixity this_mod decls
        -- Second pass over class and instance declarations, 
        -- plus rules and foreign exports, to generate bindings
        tcSetEnv env                            $
+       tcClassDecls2 this_mod tycl_decls       `thenNF_Tc` \ (lie_clasdecls, cls_dm_binds, dm_ids) ->
+       tcExtendGlobalValEnv dm_ids             $
        tcInstDecls2  local_insts               `thenNF_Tc` \ (lie_instdecls, inst_binds) ->
-       tcClassDecls2 this_mod tycl_decls       `thenNF_Tc` \ (lie_clasdecls, cls_dm_binds) ->
        tcForeignExports decls                  `thenTc`    \ (lie_fodecls,   foe_binds, foe_decls) ->
        tcSourceRules source_rules              `thenNF_Tc` \ (lie_rules,     more_local_rules) ->