
#13977: ExnStr doesn't propagate "outwards"
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
I think I might see why the demand analyser drops the `x`. Consider
`postProcessDmdEnv`,
{{{#!hs
postProcessDmdEnv :: DmdShell -> DmdEnv -> DmdEnv
postProcessDmdEnv ds@(JD { sd = ss, ud = us }) env
| Abs <- us = emptyDmdEnv
| Str _ _ <- ss
, Use One _ <- us = env -- Shell is a no-op
| otherwise = mapVarEnv (postProcessDmd ds) env
}}}
When we get here while demand-analysing the `catchRetry# @Char a`
application in `hello` we will have the "shell" equal to `JD {sd = Str
ExnStr (), ud = Use One ()}` (as computed as `defer_and_use` by
`dmdAnalStar`). The environment we are post-processing is
`{aQq->