[project @ 2001-06-11 12:24:51 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcGenDeriv.lhs
index 96ac572..1c840a1 100644 (file)
@@ -28,7 +28,7 @@ module TcGenDeriv (
 
 import HsSyn           ( InPat(..), HsExpr(..), MonoBinds(..),
                          Match(..), GRHSs(..), Stmt(..), HsLit(..),
-                         HsBinds(..), StmtCtxt(..), HsType(..),
+                         HsBinds(..), HsType(..), HsDoContext(..),
                          unguardedRHS, mkSimpleMatch, mkMonoBind, andMonoBindList
                        )
 import RdrHsSyn                ( mkHsOpApp, RdrNameMonoBinds, RdrNameHsExpr, RdrNamePat )
@@ -63,7 +63,6 @@ import Panic          ( panic, assertPanic )
 import Maybes          ( maybeToBool, orElse )
 import Constants
 import List            ( partition, intersperse )
-import Outputable      ( pprPanic, ppr, pprTrace )
 
 #if __GLASGOW_HASKELL__ >= 404
 import GlaExts         ( fromInt )
@@ -324,7 +323,7 @@ gen_Ord_binds tycon
            (if maybeToBool (maybeTyConSingleCon tycon) then
 
 --             cmp_eq_Expr ltTag_Expr eqTag_Expr gtTag_Expr a_Expr b_Expr
--- Wierd.  Was: case (cmp a b) of { LT -> LT; EQ -> EQ; GT -> GT }
+-- Weird.  Was: case (cmp a b) of { LT -> LT; EQ -> EQ; GT -> GT }
 
                cmp_eq_Expr a_Expr b_Expr
             else
@@ -719,7 +718,7 @@ gen_Ix_binds tycon
       where
        stmts = zipWith3Equal "single_con_range" mk_qual as_needed bs_needed cs_needed
                ++
-               [ReturnStmt con_expr]
+               [ResultStmt con_expr tycon_loc]
 
        mk_qual a b c = BindStmt (VarPatIn c)
                                 (HsApp (HsVar range_RDR) 
@@ -908,7 +907,7 @@ gen_Read_binds get_fixity tycon
            | is_infix  = let (h:t) = field_quals in (h:con_qual:t)
            | otherwise = con_qual:field_quals
 
-          stmts = quals ++ [ReturnStmt result_expr]
+          stmts = quals ++ [ResultStmt result_expr tycon_loc]
                
            {-
              c.f. Figure 18 in Haskell 1.1 report.