summaryrefslogtreecommitdiff
path: root/compiler/prelude/PrelNames.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-06-21 12:42:53 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-25 22:20:24 -0400
commitcac8dc9f51e31e4c0a6cd9bc302f7e1bc7c03beb (patch)
tree9513a6ebf399bf5617d8c3d1e1a70df13e222c96 /compiler/prelude/PrelNames.hs
parent5ff0a171aa199f34054092e728b56ddf6d58a093 (diff)
downloadhaskell-cac8dc9f51e31e4c0a6cd9bc302f7e1bc7c03beb.tar.gz
Don't eta-expand unsaturated primops
Previously, as described in Note [Primop wrappers], `hasNoBinding` would return False in the case of `PrimOpId`s. This would result in eta expansion of unsaturated primop applications during CorePrep. Not only did this expansion result in unnecessary allocations, but it also meant lead to rather nasty inconsistencies between the CAFfy-ness determinations made by TidyPgm and CorePrep. This fixes #16846.
Diffstat (limited to 'compiler/prelude/PrelNames.hs')
-rw-r--r--compiler/prelude/PrelNames.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/prelude/PrelNames.hs b/compiler/prelude/PrelNames.hs
index c4956ad98b..2ed73d269a 100644
--- a/compiler/prelude/PrelNames.hs
+++ b/compiler/prelude/PrelNames.hs
@@ -498,7 +498,8 @@ pRELUDE :: Module
pRELUDE = mkBaseModule_ pRELUDE_NAME
gHC_PRIM, gHC_TYPES, gHC_GENERICS, gHC_MAGIC,
- gHC_CLASSES, gHC_BASE, gHC_ENUM, gHC_GHCI, gHC_GHCI_HELPERS, gHC_CSTRING,
+ gHC_CLASSES, gHC_PRIMOPWRAPPERS, gHC_BASE, gHC_ENUM,
+ gHC_GHCI, gHC_GHCI_HELPERS, gHC_CSTRING,
gHC_SHOW, gHC_READ, gHC_NUM, gHC_MAYBE, gHC_INTEGER_TYPE, gHC_NATURAL,
gHC_LIST, gHC_TUPLE, dATA_TUPLE, dATA_EITHER, dATA_STRING,
dATA_FOLDABLE, dATA_TRAVERSABLE,
@@ -516,6 +517,7 @@ gHC_TYPES = mkPrimModule (fsLit "GHC.Types")
gHC_MAGIC = mkPrimModule (fsLit "GHC.Magic")
gHC_CSTRING = mkPrimModule (fsLit "GHC.CString")
gHC_CLASSES = mkPrimModule (fsLit "GHC.Classes")
+gHC_PRIMOPWRAPPERS = mkPrimModule (fsLit "GHC.PrimopWrappers")
gHC_BASE = mkBaseModule (fsLit "GHC.Base")
gHC_ENUM = mkBaseModule (fsLit "GHC.Enum")