Unbox around runRW#
Because `runRW#` inlines so late, we don't end up unboxing around it. For example, suppose we write
```hs
f x = runST $ do
mar <- newArray 100 x
unsafeFreeze mar
```
This will compile to something like
```hs
f x = case runRW# (\s ->
case newArray# 100# x s of { (# s', mar #) ->
case unsafeFreezeArray# mar s' of { (# s'', ar# #) ->
(# s'', Array ar# #) }}) of
(# _, ar #) -> ar
```
We generally want to pull the constructor application out of the `runRW#` argument:
```hs
f x = case runRW# (\s ->
case newArray# 100# x s of { (# s', mar #) ->
unsafeFreezeArray# mar s' }) of
(# _, ar# #) -> Array ar#
```
This exposes the `Array` constructor to case-of-case.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.4.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | low |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Unbox around runRW#","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.4.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Because `runRW#` inlines so late, we don't end up unboxing around it. For example, suppose we write\r\n\r\n{{{#!hs\r\nf x = runST $ do\r\n mar <- newArray 100 x\r\n unsafeFreeze mar\r\n}}}\r\n\r\nThis will compile to something like\r\n\r\n{{{#!hs\r\nf x = case runRW# (\\s ->\r\n case newArray# 100# x s of { (# s', mar #) ->\r\n case unsafeFreezeArray# mar s' of { (# s'', ar# #) ->\r\n (# s'', Array ar# #) }}) of\r\n (# _, ar #) -> ar\r\n}}}\r\n\r\nWe generally want to pull the constructor application out of the `runRW#` argument:\r\n\r\n{{{#!hs\r\nf x = case runRW# (\\s ->\r\n case newArray# 100# x s of { (# s', mar #) ->\r\n unsafeFreezeArray# mar s' }) of\r\n (# _, ar# #) -> Array ar#\r\n}}}\r\n\r\nThis exposes the `Array` constructor to case-of-case.","type_of_failure":"OtherFailure","blocking":[]} -->
issue