diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-04-11 19:50:20 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-04-13 18:44:28 -0400 |
commit | 1e2e62a462d2a13a1e43a520c9de38553334b0e0 (patch) | |
tree | 84496c3725424e28c569da12aeaba2157c48e803 /compiler | |
parent | 8d87975ebe943a0461039a0cf2d4b8a2f32f436b (diff) | |
download | haskell-1e2e62a462d2a13a1e43a520c9de38553334b0e0.tar.gz |
Add {lifted,unlifted}DataConKey to pretendNameIsInScope's list of Names
Fixes #19688.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Builtin/Names.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/GHC/Builtin/Names.hs b/compiler/GHC/Builtin/Names.hs index ec8d5a0afc..84210fb236 100644 --- a/compiler/GHC/Builtin/Names.hs +++ b/compiler/GHC/Builtin/Names.hs @@ -2817,7 +2817,11 @@ interactiveClassKeys = map getUnique interactiveClassNames * * ************************************************************************ -The following names should be considered by GHCi to be in scope always. +GHCi's :info command will usually filter out instances mentioning types whose +names are not in scope. GHCi makes an exception for some commonly used names, +such as Data.Kind.Type, which may not actually be in scope but should be +treated as though they were in scope. The list in the definition of +pretendNameIsInScope below contains these commonly used names. -} @@ -2825,5 +2829,6 @@ pretendNameIsInScope :: Name -> Bool pretendNameIsInScope n = any (n `hasKey`) [ liftedTypeKindTyConKey, unliftedTypeKindTyConKey + , liftedDataConKey, unliftedDataConKey , tYPETyConKey , runtimeRepTyConKey, boxedRepDataConKey ] |