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.
-> 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!
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}
%************************************************************************