diff options
author | Alexis Williams <alexis@typedr.at> | 2019-12-24 14:30:19 -0500 |
---|---|---|
committer | Alexis Williams <alexis@typedr.at> | 2019-12-24 14:30:19 -0500 |
commit | adfb908e8a53dd2b216f7442a8e79ea33afbcfed (patch) | |
tree | 7219928129681cca4ffaa49ce535f84ff25a1a86 | |
parent | 40327b037f7115f7b05cc0265acb787671bea294 (diff) | |
download | haskell-adfb908e8a53dd2b216f7442a8e79ea33afbcfed.tar.gz |
Make let/app invariant preservation check conservative rather than panickingwip/fix-17603
-rw-r--r-- | compiler/coreSyn/CoreUtils.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index 50fdcd9c7b..25eb6b51d7 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -495,7 +495,7 @@ bindNonRec bndr rhs body -- | Tests whether we have to use a @case@ rather than @let@ binding for this expression -- as per the invariants of 'CoreExpr': see "CoreSyn#let_app_invariant" needsCaseBinding :: Type -> CoreExpr -> Bool -needsCaseBinding ty rhs = isUnliftedType ty && not (exprOkForSpeculation rhs) +needsCaseBinding ty rhs = mightBeUnliftedType ty && not (exprOkForSpeculation rhs) -- Make a case expression instead of a let -- These can arise either from the desugarer, -- or from beta reductions: (\x.e) (x +# y) |