Commit 54cbdfde authored by lewie's avatar lewie
Browse files

[project @ 2001-04-10 22:34:47 by lewie]

Don't use foldr/build if we've got a parallel list comp.  We'd need to
have/generate a family of functions foldr{2,3,...} to do anything nicer here.
parent 72632453
......@@ -44,7 +44,8 @@ dsListComp :: [TypecheckedStmt]
-> DsM CoreExpr
dsListComp quals elt_ty
| not opt_FoldrBuildOn -- Be boring
| not opt_FoldrBuildOn -- Be boring
|| isParallelComp quals
= deListComp quals (mkNilExpr elt_ty)
| otherwise -- foldr/build lives!
......@@ -58,6 +59,9 @@ dsListComp quals elt_ty
dsLookupGlobalValue buildName `thenDs` \ build_id ->
returnDs (Var build_id `App` Type elt_ty
`App` mkLams [n_tyvar, c, n] result)
where isParallelComp (ParStmtOut bndrstmtss : _) = True
isParallelComp _ = False
\end{code}
%************************************************************************
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment