diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2019-02-26 17:22:28 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-03-05 03:21:53 -0500 |
commit | 646b6dfbe125aa756a935e840979ba11b4a882c0 (patch) | |
tree | e8366482a323813646cf054bba5462741128c606 /compiler/coreSyn/CoreUtils.hs | |
parent | 6c4e45b043b0577d64e5addf5eaf6503e4a10b23 (diff) | |
download | haskell-646b6dfbe125aa756a935e840979ba11b4a882c0.tar.gz |
Fix map/coerce rule for newtypes with wrappers
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.hs | 1 |
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 |