diff options
author | Sebastian Graf <sebastian.graf@kit.edu> | 2021-10-21 17:17:45 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-22 19:22:31 -0400 |
commit | dd2dba808aaa957c3d036b0025b412c499aace3d (patch) | |
tree | 8ecf5f2a4b9b946ea878786ab101e668aedcfa19 /docs/users_guide/ghc_packages.py | |
parent | 621608c990d01dd35cb2c4fb8fc49089bef81d57 (diff) | |
download | haskell-dd2dba808aaa957c3d036b0025b412c499aace3d.tar.gz |
WorkWrap: `isRecDataCon` should not eta-reduce NewTyCon field tys (#20539)
In #20539 we had a type
```hs
newtype Measured a = Measured { unmeasure :: () -> a }
```
and `isRecDataCon Measured` recursed into `go_arg_ty` for `(->) ()`, because
`unwrapNewTyConEtad_maybe` eta-reduced it. That triggered an assertion error a
bit later. Eta reducing the field type is completely wrong to do here! Just call
`unwrapNewTyCon_maybe` instead.
Fixes #20539 and adds a regression test T20539.
Diffstat (limited to 'docs/users_guide/ghc_packages.py')
0 files changed, 0 insertions, 0 deletions