diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2023-04-11 06:07:35 +0000 |
---|---|---|
committer | Josh Meredith <joshmeredith2008@gmail.com> | 2023-04-26 10:35:06 +0000 |
commit | eba7b247f31a420cae64d0ee87d7296bf434724e (patch) | |
tree | ff20a73518f78cfa52a6cd7c2b956b98d8a1dd33 /compiler/GHC/Stg/Debug.hs | |
parent | 74c557121fbcae32abd3b4a69513f8aa7d536073 (diff) | |
download | haskell-wip/js-stgrhsclosure.tar.gz |
Refactor GenStgRhs to include the Type in both constructors (#23280, #22576, #22364)wip/js-stgrhsclosure
Carry the actual type of an expression through the PreStgRhs and into GenStgRhs
for use in later stages. Currently this is used in the JavaScript backend to fix
some tests from the above mentioned issues: EtaExpandLevPoly, RepPolyWrappedVar2,
T13822, T14749.
Diffstat (limited to 'compiler/GHC/Stg/Debug.hs')
-rw-r--r-- | compiler/GHC/Stg/Debug.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Stg/Debug.hs b/compiler/GHC/Stg/Debug.hs index 4dbd5af526..39a559cb73 100644 --- a/compiler/GHC/Stg/Debug.hs +++ b/compiler/GHC/Stg/Debug.hs @@ -68,7 +68,7 @@ collectStgBind (StgRec pairs) = do return (StgRec es) collectStgRhs :: Id -> StgRhs -> M StgRhs -collectStgRhs bndr (StgRhsClosure ext cc us bs e)= do +collectStgRhs bndr (StgRhsClosure ext cc us bs e t) = do let name = idName bndr -- If the name has a span, use that initially as the source position in-case @@ -78,10 +78,10 @@ collectStgRhs bndr (StgRhsClosure ext cc us bs e)= do _ -> id e' <- with_span $ collectExpr e recordInfo bndr e' - return $ StgRhsClosure ext cc us bs e' -collectStgRhs _bndr (StgRhsCon cc dc _mn ticks args) = do + return $ StgRhsClosure ext cc us bs e' t +collectStgRhs _bndr (StgRhsCon cc dc _mn ticks args typ) = do n' <- numberDataCon dc ticks - return (StgRhsCon cc dc n' ticks args) + return (StgRhsCon cc dc n' ticks args typ) recordInfo :: Id -> StgExpr -> M () |