X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FsimplCore%2FMagicUFs.lhs;fp=ghc%2Fcompiler%2FsimplCore%2FMagicUFs.lhs;h=ad986d78b6dd20f7296bbfa1bb7e3e0b096f9829;hb=5cf27e8f1731c52fe63a5b9615f927484164c61b;hp=47d0a27cf497bb301a1c071dc2098aa5f6d96ea9;hpb=68afb16743cafd5b7495771d359891c6dfc5a186;p=ghc-hetmet.git diff --git a/ghc/compiler/simplCore/MagicUFs.lhs b/ghc/compiler/simplCore/MagicUFs.lhs index 47d0a27..ad986d7 100644 --- a/ghc/compiler/simplCore/MagicUFs.lhs +++ b/ghc/compiler/simplCore/MagicUFs.lhs @@ -22,7 +22,7 @@ import SimplEnv ( SimplEnv ) import SimplMonad ( SmplM(..), SimplCount ) import Type ( mkFunTys ) import Unique ( Unique{-instances-} ) -import Util ( assoc, zipWith3Equal, panic ) +import Util ( assoc, zipWith3Equal, nOfThem, panic ) \end{code} %************************************************************************ @@ -199,7 +199,7 @@ foldr_fun env (TypeArg ty1:TypeArg ty2:ValArg arg_k:ValArg arg_z:ValArg arg_list tick Foldr_List `thenSmpl_` newIds ( mkFunTys [ty1, ty2] ty2 : - take (length the_list) (repeat ty2) + nOfThem (length the_list) ty2 ) `thenSmpl` \ (f_id:ele_id1:ele_ids) -> let fst_bind = NonRec @@ -209,7 +209,7 @@ foldr_fun env (TypeArg ty1:TypeArg ty2:ValArg arg_k:ValArg arg_z:ValArg arg_list ValArg (VarArg f_id), ValArg arg_z, ValArg the_tl]) - rest_binds = zipWith3Equal + rest_binds = zipWith3Equal "Foldr:rest_binds" (\ e v e' -> NonRec e (mkRhs v e')) ele_ids (reverse (tail the_list)) @@ -520,10 +520,10 @@ foldl_fun env (TypeArg ty1:TypeArg ty2:ValArg arg_k:ValArg arg_z:ValArg arg_list tick Foldl_List `thenSmpl_` newIds ( mkFunTys [ty1, ty2] ty1 : - take (length the_list) (repeat ty1) + nOfThem (length the_list) ty1 ) `thenSmpl` \ (f_id:ele_ids) -> let - rest_binds = zipWith3Equal + rest_binds = zipWith3Equal "foldl:rest_binds" (\ e v e' -> NonRec e (mkRhs v e')) ele_ids -- :: [Id] the_list -- :: [CoreArg]