diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2019-12-19 11:50:10 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-12-20 10:50:57 -0500 |
commit | 70e56b272492b65e41a149ec39a939e794fea66b (patch) | |
tree | a030c730bed2d539433ebdf16609aa88439c83fe /compiler/iface/LoadIface.hs | |
parent | 1a0d1a6583cc39a31d6947eda1d4998c4fb53c4f (diff) | |
download | haskell-70e56b272492b65e41a149ec39a939e794fea66b.tar.gz |
lookupBindGroupOcc: recommend names in the same namespace (#17593)
Previously, `lookupBindGroupOcc`'s error message would recommend all
similar names in scope, regardless of whether they were type
constructors, data constructors, or functions, leading to the
confusion witnessed in #17593. This is easily fixed by only
recommending names in the same namespace, using the
`nameSpacesRelated` function.
Fixes #17593.
Diffstat (limited to 'compiler/iface/LoadIface.hs')
-rw-r--r-- | compiler/iface/LoadIface.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs index 38f7524b8e..176b6cd0d0 100644 --- a/compiler/iface/LoadIface.hs +++ b/compiler/iface/LoadIface.hs @@ -156,7 +156,7 @@ importDecl name where nd_doc = text "Need decl for" <+> ppr name not_found_msg = hang (text "Can't find interface-file declaration for" <+> - pprNameSpace (occNameSpace (nameOccName name)) <+> ppr name) + pprNameSpace (nameNameSpace name) <+> ppr name) 2 (vcat [text "Probable cause: bug in .hi-boot file, or inconsistent .hi file", text "Use -ddump-if-trace to get an idea of which file caused the error"]) found_things_msg eps = |