diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2021-05-27 12:02:45 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-06-05 19:23:46 -0400 |
commit | 52a524f7c8c5701708a007a5946c27914703d045 (patch) | |
tree | 63e5417205788aa800e06ef679f96ca29a3586aa /compiler/GHC/IfaceToCore.hs | |
parent | ea9a4ef69a382cf3cee28b78eca390a6a06c6965 (diff) | |
download | haskell-52a524f7c8c5701708a007a5946c27914703d045.tar.gz |
Re-do rubbish literals
As #19882 pointed out, we were simply doing rubbish literals wrong.
(I'll refrain from explaining the wrong-ness here -- see the ticket.)
This patch fixes it by adding a Type (of kind RuntimeRep) as field of
LitRubbish, rather than [PrimRep].
The Note [Rubbish literals] in GHC.Types.Literal explains the details.
Diffstat (limited to 'compiler/GHC/IfaceToCore.hs')
-rw-r--r-- | compiler/GHC/IfaceToCore.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/GHC/IfaceToCore.hs b/compiler/GHC/IfaceToCore.hs index e72c931ae6..de65e43ccd 100644 --- a/compiler/GHC/IfaceToCore.hs +++ b/compiler/GHC/IfaceToCore.hs @@ -1454,6 +1454,10 @@ tcIfaceExpr (IfaceLcl name) tcIfaceExpr (IfaceExt gbl) = Var <$> tcIfaceExtId gbl +tcIfaceExpr (IfaceLitRubbish rep) + = do rep' <- tcIfaceType rep + return (Lit (LitRubbish rep')) + tcIfaceExpr (IfaceLit lit) = do lit' <- tcIfaceLit lit return (Lit lit') |