X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fstranal%2FWwLib.lhs;h=d066f44a1a0dd120e1a2ca6a23f78af70247edea;hb=4ff3da9aa11dc1c5d00f03248dc41c7d84309fa1;hp=f10cb2288e1c4d0caa6796f3837eef3121fe55cf;hpb=5e0ea427646a5474dd7c659b0713c6a62d8c99c7;p=ghc-hetmet.git diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs index f10cb22..d066f44 100644 --- a/compiler/stranal/WwLib.lhs +++ b/compiler/stranal/WwLib.lhs @@ -4,6 +4,13 @@ \section[WwLib]{A library for the ``worker/wrapper'' back-end to the strictness analyser} \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 WwLib ( mkWwBodies, mkWWstr, mkWorkerArgs ) where #include "HsVersions.h" @@ -20,9 +27,7 @@ import NewDemand ( Demand(..), DmdResult(..), Demands(..) ) import MkId ( realWorldPrimId, voidArgId, mkRuntimeErrorApp, rUNTIME_ERROR_ID, mkUnpackCase, mkProductBox ) import TysWiredIn ( tupleCon ) -import Type ( Type, isUnLiftedType, mkFunTys, - splitForAllTys, splitFunTys, isAlgType - ) +import Type import Coercion ( mkSymCoercion, splitNewTypeRepCo_maybe ) import BasicTypes ( Boxity(..) ) import Var ( Var, isId ) @@ -134,7 +139,7 @@ mkWwBodies fun_ty demands res_info one_shots returnUs (id, id, res_ty) ) `thenUs` \ (wrap_fn_cpr, work_fn_cpr, _cpr_res_ty) -> - returnUs ([idNewDemandInfo v | v <- work_args, isId v], + returnUs ([idNewDemandInfo v | v <- work_call_args, isId v], Note InlineMe . wrap_fn_args . wrap_fn_cpr . wrap_fn_str . applyToVars work_call_args . Var, mkLams work_lam_args. work_fn_str . work_fn_cpr . work_fn_args) -- We use an INLINE unconditionally, even if the wrapper turns out to be @@ -415,8 +420,9 @@ mkWWcpr :: Type -- function body type Type) -- Type of worker's body mkWWcpr body_ty RetCPR - | not (isAlgType body_ty) - = WARN( True, text "mkWWcpr: non-algebraic body type" <+> ppr body_ty ) + | not (isClosedAlgType body_ty) + = WARN( True, + text "mkWWcpr: non-algebraic or open body type" <+> ppr body_ty ) returnUs (id, id, body_ty) | n_con_args == 1 && isUnLiftedType con_arg_ty1