+ = do { (floats1, rhs1) <- cpeRhsE env rhs
+ ; let (rhs1_bndrs, _) = collectBinders rhs1
+ ; (floats2, rhs2)
+ <- if want_float floats1 rhs1
+ then return (floats1, rhs1)
+ else -- Non-empty floats will wrap rhs1
+ -- But: rhs1 might have lambdas, and we can't
+ -- put them inside a wrapBinds
+ if valBndrCount rhs1_bndrs <= arity
+ then -- Lambdas in rhs1 will be nuked by eta expansion
+ return (emptyFloats, wrapBinds floats1 rhs1)
+
+ else do { body1 <- rhsToBodyNF rhs1
+ ; return (emptyFloats, wrapBinds floats1 body1) }
+
+ ; (floats3, rhs') -- Note [Silly extra arguments]
+ <- if manifestArity rhs2 <= arity
+ then return (floats2, cpeEtaExpand arity rhs2)
+ else WARN(True, text "CorePrep: silly extra arguments:" <+> ppr bndr)
+ (do { v <- newVar (idType bndr)
+ ; let float = mkFloat False False v rhs2
+ ; return (addFloat floats2 float, cpeEtaExpand arity (Var v)) })