From: Simon Marlow Date: Wed, 3 Oct 2007 17:32:02 +0000 (+0000) Subject: warning removal X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=5862b2c52a1d678ef54ddbbdbcec93999bc247cc warning removal --- diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs index a3cc86c..851bf66 100644 --- a/compiler/basicTypes/DataCon.lhs +++ b/compiler/basicTypes/DataCon.lhs @@ -5,13 +5,6 @@ \section[DataCon]{@DataCon@: Data Constructors} \begin{code} -{-# OPTIONS -w #-} --- The above warning supression flag is a temporary kludge. --- While working on this module you are encouraged to remove it and fix --- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings --- for details - module DataCon ( DataCon, DataConIds(..), ConTag, fIRST_TAG, @@ -51,7 +44,6 @@ import ListSetOps import Util import Maybes import FastString -import PackageConfig import Module import Data.Char @@ -532,6 +524,7 @@ mkDataCon name declared_infix eqSpecPreds :: [(TyVar,Type)] -> ThetaType eqSpecPreds spec = [ mkEqPred (mkTyVarTy tv, ty) | (tv,ty) <- spec ] +mk_dict_strict_mark :: PredType -> StrictnessMark mk_dict_strict_mark pred | isStrictPred pred = MarkedStrict | otherwise = NotMarkedStrict \end{code} @@ -615,6 +608,7 @@ dataConSourceArity dc = length (dcOrigArgTys dc) -- {\em representation} of the data constructor. This may be more than appear -- in the source code; the extra ones are the existentially quantified -- dictionaries +dataConRepArity :: DataCon -> Int dataConRepArity (MkData {dcRepArgTys = arg_tys}) = length arg_tys isNullarySrcDataCon, isNullaryRepDataCon :: DataCon -> Bool @@ -791,14 +785,16 @@ splitProductType_maybe ty where data_con = ASSERT( not (null (tyConDataCons tycon)) ) head (tyConDataCons tycon) - other -> Nothing + _other -> Nothing +splitProductType :: String -> Type -> (TyCon, [Type], DataCon, [Type]) splitProductType str ty = case splitProductType_maybe ty of Just stuff -> stuff Nothing -> pprPanic (str ++ ": not a product") (pprType ty) +deepSplitProductType_maybe :: Type -> Maybe (TyCon, [Type], DataCon, [Type]) deepSplitProductType_maybe ty = do { (res@(tycon, tycon_args, _, _)) <- splitProductType_maybe ty ; let {result @@ -811,6 +807,7 @@ deepSplitProductType_maybe ty ; result } +deepSplitProductType :: String -> Type -> (TyCon, [Type], DataCon, [Type]) deepSplitProductType str ty = case deepSplitProductType_maybe ty of Just stuff -> stuff