diff options
Diffstat (limited to 'compiler/GHC/Core.hs')
-rw-r--r-- | compiler/GHC/Core.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs index 23306a29d0..f613b4c4db 100644 --- a/compiler/GHC/Core.hs +++ b/compiler/GHC/Core.hs @@ -60,7 +60,7 @@ module GHC.Core ( -- ** Predicates and deconstruction on 'Unfolding' unfoldingTemplate, expandUnfolding_maybe, - maybeUnfoldingTemplate, otherCons, + maybeUnfoldingTemplate, maybeUnfoldingSource, otherCons, isValueUnfolding, isEvaldUnfolding, isCheapUnfolding, isExpandableUnfolding, isConLikeUnfolding, isCompulsoryUnfolding, isStableUnfolding, isStableUserUnfolding, isStableSystemUnfolding, @@ -1454,6 +1454,11 @@ maybeUnfoldingTemplate (DFunUnfolding { df_bndrs = bndrs, df_con = con, df_args maybeUnfoldingTemplate _ = Nothing +maybeUnfoldingSource :: Unfolding -> Maybe UnfoldingSource +maybeUnfoldingSource (CoreUnfolding { uf_src = src }) + = Just src +maybeUnfoldingSource _ = Nothing + -- | The constructors that the unfolding could never be: -- returns @[]@ if no information is available otherCons :: Unfolding -> [AltCon] |