summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2022-07-18 13:40:48 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-07-25 14:38:14 -0400
commit726d938eb6604e2fe788f914e295aa1e29109b26 (patch)
tree03ca20480df5dfc1821c6660466f74fc5e7d1fb1
parente4bf95920a9bbcb5b6ac3715282c69f612137156 (diff)
downloadhaskell-726d938eb6604e2fe788f914e295aa1e29109b26.tar.gz
Fix isEvaldUnfolding and isValueUnfolding
This fixes (1) in #21831. Easy, obviously correct.
-rw-r--r--compiler/GHC/Core.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs
index ca6a564848..e2e55dbc98 100644
--- a/compiler/GHC/Core.hs
+++ b/compiler/GHC/Core.hs
@@ -1504,6 +1504,7 @@ otherCons _ = []
isValueUnfolding :: Unfolding -> Bool
-- Returns False for OtherCon
isValueUnfolding (CoreUnfolding { uf_is_value = is_evald }) = is_evald
+isValueUnfolding (DFunUnfolding {}) = True
isValueUnfolding _ = False
-- | Determines if it possibly the case that the unfolding will
@@ -1512,6 +1513,7 @@ isValueUnfolding _ = False
isEvaldUnfolding :: Unfolding -> Bool
-- Returns True for OtherCon
isEvaldUnfolding (OtherCon _) = True
+isEvaldUnfolding (DFunUnfolding {}) = True
isEvaldUnfolding (CoreUnfolding { uf_is_value = is_evald }) = is_evald
isEvaldUnfolding _ = False