diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2019-01-29 16:37:19 +0100 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2019-01-29 16:37:19 +0100 |
commit | aa00bdb2122991f07415e1f5f4850d929dad96a3 (patch) | |
tree | a8612ce019ec8e88656290519a6404e00802f398 /compiler/coreSyn/CoreUtils.hs | |
parent | 7cdcd3e12a5c3a337e36fa80c64bd72e5ef79b24 (diff) | |
download | haskell-wip/T16254.tar.gz |
Look through newtype wrappers (Trac #16254)wip/T16254
This allows exprIsConApp_maybe to detect that Size (I# 10)
is a constructor application when Size has a wrapper.
Diffstat (limited to 'compiler/coreSyn/CoreUtils.hs')
-rw-r--r-- | compiler/coreSyn/CoreUtils.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index 9c425e72f0..49a89b27e3 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -1360,6 +1360,7 @@ isExpandableApp fn n_val_args | otherwise = case idDetails fn of DataConWorkId {} -> True -- Actually handled by isWorkFreeApp + DataConWrapId {} -> True RecSelId {} -> n_val_args == 1 -- See Note [Record selection] ClassOpId {} -> n_val_args == 1 PrimOpId {} -> False |