- ty' = tidyType env (idType id)
- id' = mkUserLocal occ' (idUnique id) ty' noSrcSpan
- `setIdInfo` vanillaIdInfo
- var_env' = extendVarEnv var_env id id'
+ ty' = tidyType env (idType id)
+ name' = mkInternalName (idUnique id) occ' noSrcSpan
+ id' = mkLocalIdWithInfo name' ty' new_info
+ var_env' = extendVarEnv var_env id id'
+ new_info | isDeadOcc (idOccInfo id) = deadIdInfo
+ | otherwise = vanillaIdInfo