idOccInfo,
-- ** Writing 'IdInfo' fields
+ setIdUnfoldingLazily,
setIdUnfolding,
setIdArity,
setIdDemandInfo,
import StaticFlags
-- infixl so you can say (id `set` a `set` b)
-infixl 1 `setIdUnfolding`,
+infixl 1 `setIdUnfoldingLazily`,
+ `setIdUnfolding`,
`setIdArity`,
`setIdOccInfo`,
`setIdDemandInfo`,
-- Expose the unfolding if there is one, including for loop breakers
realIdUnfolding id = unfoldingInfo (idInfo id)
+setIdUnfoldingLazily :: Id -> Unfolding -> Id
+setIdUnfoldingLazily id unfolding = modifyIdInfo (`setUnfoldingInfoLazily` unfolding) id
+
setIdUnfolding :: Id -> Unfolding -> Id
setIdUnfolding id unfolding = modifyIdInfo (`setUnfoldingInfo` unfolding) id
vty <- vectType (idType var)
-- Make the vectorised version of binding's name, and set the unfolding used for inlining.
- var' <- liftM (`setIdUnfolding` unfolding)
+ var' <- liftM (`setIdUnfoldingLazily` unfolding)
$ cloneId mkVectOcc var vty
-- Add the mapping between the plain and vectorised name to the state.