summaryrefslogtreecommitdiff
path: root/compiler/coreSyn/CoreUtils.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2019-02-26 17:22:28 +0100
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2019-02-26 17:28:34 +0100
commit7cc5844bfc3d5b1460f441ca48c5a7d2f5945be7 (patch)
tree8d79f5c89c589a892f47ad50cb0f007549d25352 /compiler/coreSyn/CoreUtils.hs
parent14586f5d737ec5dc828633267b50dcf0d47e1696 (diff)
downloadhaskell-wip/T16208.tar.gz
Fix map/coerce rule for newtypes with wrapperswip/T16208
This addresses Trac #16208 by marking newtype wrapper unfoldings as compulsory. Furthermore, we can remove the special case for newtypes in exprIsConApp_maybe (introduced in 7833cf407d1f).
Diffstat (limited to 'compiler/coreSyn/CoreUtils.hs')
-rw-r--r--compiler/coreSyn/CoreUtils.hs1
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs
index ee79a0f930..5b161995ea 100644
--- a/compiler/coreSyn/CoreUtils.hs
+++ b/compiler/coreSyn/CoreUtils.hs
@@ -1360,7 +1360,6 @@ isExpandableApp fn n_val_args
| otherwise
= case idDetails fn of
DataConWorkId {} -> True -- Actually handled by isWorkFreeApp
- DataConWrapId {} -> True -- See Note [Special case for newtype wrappers]
RecSelId {} -> n_val_args == 1 -- See Note [Record selection]
ClassOpId {} -> n_val_args == 1
PrimOpId {} -> False