fix haddock submodule pointer
[ghc-hetmet.git] / compiler / typecheck / TcRnMonad.lhs
index 545258c..43232e5 100644 (file)
@@ -135,7 +135,8 @@ initTc hsc_env hsc_src keep_rn_syntax mod do_this
                tcl_tyvars     = tvs_var,
                tcl_lie        = lie_var,
                 tcl_meta       = meta_var,
-               tcl_untch      = initTyVarUnique
+               tcl_untch      = initTyVarUnique,
+                tcl_hetMetLevel    = []
             } ;
        } ;
    
@@ -494,9 +495,10 @@ getSrcSpanM :: TcRn SrcSpan
 getSrcSpanM = do { env <- getLclEnv; return (tcl_loc env) }
 
 setSrcSpan :: SrcSpan -> TcRn a -> TcRn a
-setSrcSpan loc thing_inside
-  | isGoodSrcSpan loc = updLclEnv (\env -> env { tcl_loc = loc }) thing_inside
-  | otherwise        = thing_inside    -- Don't overwrite useful info with useless
+setSrcSpan loc@(RealSrcSpan _) thing_inside
+    = updLclEnv (\env -> env { tcl_loc = loc }) thing_inside
+-- Don't overwrite useful info with useless:
+setSrcSpan (UnhelpfulSpan _) thing_inside = thing_inside
 
 addLocM :: (a -> TcM b) -> Located a -> TcM b
 addLocM fn (L loc a) = setSrcSpan loc $ fn a