import CoreSyn
import CoreUtils ( exprIsTrivial, idSpecVars )
import Const ( Con(..), Literal(..) )
-import Id ( idWantsToBeINLINEd,
+import Id ( idWantsToBeINLINEd, isSpecPragmaId,
getInlinePragma, setInlinePragma,
omitIfaceSigForId,
getIdSpecialisation,
simplPrags bndr bndr' etad_rhs `thenSmpl` \ bndr'' ->
modifyInScope bndr'' $
thing_inside `thenSmpl` \ stuff ->
- returnSmpl (addBind (NonRec bndr' etad_rhs) stuff)
+ returnSmpl (addBind (NonRec bndr'' etad_rhs) stuff)
where
etad_rhs = etaCoreExpr rhs
= returnSmpl (bndr_w_unfolding)
| otherwise
- = pprTrace "simplPrags" (ppr old_bndr) $
- getSimplBinderStuff `thenSmpl` \ (ty_subst, id_subst, in_scope, us) ->
+ = getSimplBinderStuff `thenSmpl` \ (ty_subst, id_subst, in_scope, us) ->
let
- spec_env' = substSpecEnv ty_subst in_scope (subst_val id_subst) spec_env
+ spec_env' = substSpecEnv ty_subst in_scope (subst_val id_subst) spec_env
+ final_bndr = bndr_w_unfolding `setIdSpecialisation` spec_env'
in
- returnSmpl (bndr_w_unfolding `setIdSpecialisation` spec_env')
+ returnSmpl final_bndr
where
bndr_w_unfolding = new_bndr `setIdUnfolding` mkUnfolding new_rhs