X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FsimplCore%2FFoldrBuildWW.lhs;h=50d7f059fd0cc425cfb6d6d7dcb40287de4e37fe;hb=d2cf1d400e2ef64e824432aa350f3cf244ece2b3;hp=f7fc93390646c67f888ec85ee09ee4705559c6e7;hpb=7a3bd641457666e10d0a47be9f22762e03defbf0;p=ghc-hetmet.git diff --git a/ghc/compiler/simplCore/FoldrBuildWW.lhs b/ghc/compiler/simplCore/FoldrBuildWW.lhs index f7fc933..50d7f05 100644 --- a/ghc/compiler/simplCore/FoldrBuildWW.lhs +++ b/ghc/compiler/simplCore/FoldrBuildWW.lhs @@ -4,13 +4,11 @@ \section[FoldrBuildWW]{Spliting suitable functions into Workers and Wrappers} \begin{code} -#include "HsVersions.h" - module FoldrBuildWW ( mkFoldrBuildWW ) where -IMP_Ubiq(){-uitous-} +#include "HsVersions.h" -import CoreSyn ( SYN_IE(CoreBinding) ) +import CoreSyn ( CoreBinding ) import UniqSupply ( UniqSupply ) import Util ( panic{-ToDo:rm?-} ) @@ -19,7 +17,7 @@ import Util ( panic{-ToDo:rm?-} ) --import TysPrim ( alphaTy ) --import TyVar ( alphaTyVar ) -- ---import Type ( SYN_IE(Type) ) -- **** CAN SEE THE CONSTRUCTORS **** +--import Type ( Type ) -- **** CAN SEE THE CONSTRUCTORS **** --import UniqSupply ( runBuiltinUs ) --import WwLib -- share the same monad (is this eticit ?) --import PrelInfo ( listTyCon, mkListTy, nilDataCon, consDataCon, @@ -74,12 +72,9 @@ wwExpr (App f atom) = wwExpr (CoTyApp f ty) = wwExpr f `thenWw` \ f' -> returnWw (CoTyApp f' ty) -wwExpr (SCC lab e) = - wwExpr e `thenWw` \ e' -> - returnWw (SCC lab e') -wwExpr (Coerce c ty e) = +wwExpr (Note note e) = wwExpr e `thenWw` \ e' -> - returnWw (Coerce c ty e') + returnWw (Note note e') wwExpr (Let bnds e) = wwExpr e `thenWw` \ e' -> wwBind bnds `thenWw` \ bnds' -> @@ -117,7 +112,7 @@ try_split_bind id expr = | FBGoodProd == prod -> {- || any (== FBGoodConsum) consum -} let - (use_args,big_args,args,body) = collectBinders expr' + (big_args,args,body) = collectBinders expr' in if length args /= length consum -- funny number of arguments then returnWw [(id,expr')] @@ -127,7 +122,7 @@ try_split_bind id expr = -- f_wrk /\ t1 .. tn t_new \ v1 .. vn c n -> foldr c n e -- f /\ t1 .. tn \ v1 .. vn -- -> build exprTy (\ c n -> f_wrk t1 .. tn t_new v1 .. vn c n) - pprTrace "WW:" (ppr PprDebug id) (returnWw ()) + pprTrace "WW:" (ppr id) (returnWw ()) `thenWw` \ () -> getUniqueWw `thenWw` \ ty_new_uq -> getUniqueWw `thenWw` \ worker_new_uq ->