
This function has disappeard from CoreUtils in recent release(s). I am portfing some code which uses this function (just once). What should I be looking to use instead? -- Colin Adams Preston Lancashire

It moved to MkCore:
mkIfThenElse :: CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr
mkIfThenElse guard then_expr else_expr
-- Not going to be refining, so okay to take the type of the "then" clause
= mkWildCase guard boolTy (exprType then_expr)
[ (DataAlt falseDataCon, [], else_expr), -- Increasing order of tag!
(DataAlt trueDataCon, [], then_expr) ]
Cheers,
Max
2009/3/22 Colin Paul Adams
This function has disappeard from CoreUtils in recent release(s). I am portfing some code which uses this function (just once). What should I be looking to use instead? -- Colin Adams Preston Lancashire _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

2009/3/22 Colin Paul Adams
"Max" == Max Bolingbroke
writes: Max> It moved to MkCore
Thanks.
What about mkWildId from Id.lhs? That one seems to have vanished.
Looks that might be the same deal (moved to MkCore), assuming this is what you wanted: -- | Make a /wildcard binder/. This is typically used when you need a binder -- that you expect to use only at a *binding* site. Do not use it at -- occurrence sites because it has a single, fixed unique, and it's very -- easy to get into difficulties with shadowing. That's why it is used so little. mkWildBinder :: Type -> Id mkWildBinder ty = mkSysLocal (fsLit "wild") (mkBuiltinUnique 1) ty Cheers, Max
participants (2)
-
Colin Paul Adams
-
Max Bolingbroke