projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 1996-05-16 09:42:08 by partain]
[ghc-hetmet.git]
/
ghc
/
compiler
/
simplCore
/
MagicUFs.lhs
diff --git
a/ghc/compiler/simplCore/MagicUFs.lhs
b/ghc/compiler/simplCore/MagicUFs.lhs
index
47d0a27
..
ad986d7
100644
(file)
--- 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 SimplMonad ( SmplM(..), SimplCount )
import Type ( mkFunTys )
import Unique ( Unique{-instances-} )
-import Util ( assoc, zipWith3Equal, panic )
+import Util ( assoc, zipWith3Equal, nOfThem, panic )
\end{code}
%************************************************************************
\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 :
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
) `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])
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))
(\ 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 :
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
) `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]
(\ e v e' -> NonRec e (mkRhs v e'))
ele_ids -- :: [Id]
the_list -- :: [CoreArg]