[project @ 2005-10-14 11:22:41 by simonpj]
[ghc-hetmet.git] / ghc / compiler / stgSyn / StgLint.lhs
index 0d1b7b5..326cd44 100644 (file)
@@ -13,7 +13,7 @@ import StgSyn
 import Bag             ( Bag, emptyBag, isEmptyBag, snocBag, bagToList )
 import Id              ( Id, idType, isLocalId )
 import VarSet
-import DataCon         ( DataCon, dataConArgTys, dataConRepType )
+import DataCon         ( DataCon, dataConInstArgTys, dataConRepType )
 import CoreSyn         ( AltCon(..) )
 import PrimOp          ( primOpType )
 import Literal         ( literalType )
@@ -59,7 +59,7 @@ generation.  Solution: don't use it!  (KSW 2000-05).
 lintStgBindings :: String -> [StgBinding] -> [StgBinding]
 
 lintStgBindings whodunnit binds
-  = _scc_ "StgLint"
+  = {-# SCC "StgLint" #-}
     case (initL (lint_binds binds)) of
       Nothing  -> binds
       Just msg -> pprPanic "" (vcat [
@@ -217,6 +217,7 @@ lintStgExpr e@(StgCase scrut _ _ bndr _ alts_type alts)
     (case scrut of
        StgApp _ _    -> returnL ()
        StgConApp _ _ -> returnL ()
+       StgOpApp _ _ _ -> returnL ()
        other -> addErrL (mkCaseOfCaseMsg e))   `thenL_`
 
     addInScopeVars [bndr] (lintStgAlts alts scrut_ty)
@@ -258,7 +259,7 @@ lintAlt scrut_ty (DataAlt con, args, _, rhs)
                                  not (isNewTyCon tycon) ->
         let
           cons    = tyConDataCons tycon
-          arg_tys = dataConArgTys con tys_applied
+          arg_tys = dataConInstArgTys con tys_applied
                -- This almost certainly does not work for existential constructors
         in
         checkL (con `elem` cons) (mkAlgAltMsg2 scrut_ty con) `thenL_`