summaryrefslogtreecommitdiff
path: root/compiler/GHC.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simon.peytonjones@gmail.com>2023-01-26 16:16:32 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-27 23:54:55 -0500
commit638277ba7bd2683f539afb0bf469fe75376994e2 (patch)
treee5e0a9f4d8a7d0ea6c3a610e5ab105293ae91a5e /compiler/GHC.hs
parent545bf8cf1844e2a1c18d2019d1f299ab10099873 (diff)
downloadhaskell-638277ba7bd2683f539afb0bf469fe75376994e2.tar.gz
Detect family instance orphans correctly
We were treating a type-family instance as a non-orphan if there was a type constructor on its /right-hand side/ that was local. Boo! Utterly wrong. With this patch, we correctly check the /left-hand side/ instead! Fixes #22717
Diffstat (limited to 'compiler/GHC.hs')
-rw-r--r--compiler/GHC.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs
index 308ea08780..dfa5bf5ff2 100644
--- a/compiler/GHC.hs
+++ b/compiler/GHC.hs
@@ -366,8 +366,7 @@ import GHC.Core.TyCon
import GHC.Core.TyCo.Ppr ( pprForAll )
import GHC.Core.Class
import GHC.Core.DataCon
-import GHC.Core.FVs ( orphNamesOfFamInst )
-import GHC.Core.FamInstEnv ( FamInst, famInstEnvElts )
+import GHC.Core.FamInstEnv ( FamInst, famInstEnvElts, orphNamesOfFamInst )
import GHC.Core.InstEnv
import GHC.Core