[Git][ghc/ghc][wip/T22717] 2 commits: Wibble
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Sun Jan 22 23:14:15 UTC 2023
Simon Peyton Jones pushed to branch wip/T22717 at Glasgow Haskell Compiler / GHC
Commits:
af88d590 by Simon Peyton Jones at 2023-01-22T23:10:04+00:00
Wibble
- - - - -
c9f11126 by Simon Peyton Jones at 2023-01-22T23:14:20+00:00
More wibbles
- - - - -
7 changed files:
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/TyCl/Class.hs
- compiler/GHC/Tc/Utils/TcType.hs
- testsuite/tests/indexed-types/should_compile/T22717_fam_orph.hs
Changes:
=====================================
compiler/GHC/Core/FVs.hs
=====================================
@@ -434,7 +434,7 @@ orphNamesOfCoAxBranch (CoAxBranch { cab_lhs = lhs, cab_rhs = rhs })
-- For instance, given `type family Foo a b`:
-- `type instance Foo (F (G (H a))) b = ...` would yield [Foo,F,G,H]
--
--- Used (via oprhNamesOfFamInst) in the implementation of ":info" in GHCi.
+-- Used (via orphNamesOfFamInst) in the implementation of ":info" in GHCi.
-- and when determining orphan-hood for a FamInst or module
orphNamesOfAxiomLHS :: CoAxiom br -> NameSet
orphNamesOfAxiomLHS axiom
=====================================
compiler/GHC/Tc/Deriv/Generate.hs
=====================================
@@ -48,7 +48,6 @@ import GHC.Hs
import GHC.Tc.Utils.Monad
import GHC.Tc.Utils.Instantiate( newFamInst )
--- import GHC.Tc.Instance.Family
import GHC.Tc.Utils.Env
import GHC.Tc.Utils.TcType
import GHC.Tc.Utils.Zonk
=====================================
compiler/GHC/Tc/Errors/Types.hs
=====================================
@@ -1079,9 +1079,9 @@ data TcRnMessage where
-}
TcRnMonomorphicBindings :: [Name] -> TcRnMessage
- {-| TcRnOrphanClsInst and TcRnOrphanFamInst ared warnings (controlled by -Wwarn-orphans)
+ {-| TcRnOrphanClsInst and TcRnOrphanFamInst are warnings (controlled by -Worphans)
that arise when a typeclass instance or family instance is an \"orphan\", i.e. if it
- appears in a module in which neither the class nor the type being instanced are
+ appears in a module in which neither the class/family nor the type being instanced are
declared in the same module.
Examples(s): None
=====================================
compiler/GHC/Tc/Module.hs
=====================================
@@ -112,7 +112,6 @@ import GHC.Hs.Dump
import GHC.Core.PatSyn ( pprPatSynType )
import GHC.Core.Predicate ( classMethodTy )
-import GHC.Core.FamInstEnv( orphNamesOfFamInst )
import GHC.Core.InstEnv
import GHC.Core.TyCon
import GHC.Core.ConLike
@@ -124,7 +123,7 @@ import GHC.Core.Reduction ( Reduction(..) )
import GHC.Core.RoughMap( RoughMatchTc(..) )
import GHC.Core.TyCo.Ppr( debugPprType )
import GHC.Core.FamInstEnv
- ( FamInst, pprFamInst, famInstsRepTyCons
+ ( FamInst, pprFamInst, famInstsRepTyCons, orphNamesOfFamInst
, famInstEnvElts, extendFamInstEnvList, normaliseType )
import GHC.Parser.Header ( mkPrelImports )
=====================================
compiler/GHC/Tc/TyCl/Class.hs
=====================================
@@ -34,10 +34,9 @@ import GHC.Tc.Types.Evidence ( idHsWrapper )
import GHC.Tc.Gen.Bind
import GHC.Tc.Utils.Env
import GHC.Tc.Utils.Unify
-import GHC.Tc.Utils.Instantiate( tcSuperSkolTyVars )
+import GHC.Tc.Utils.Instantiate( newFamInst, tcSuperSkolTyVars )
import GHC.Tc.Gen.HsType
import GHC.Tc.Utils.TcMType
-import GHC.Tc.Utils.Instantiate( newFamInst )
import GHC.Tc.Types.Origin
import GHC.Tc.Utils.TcType
import GHC.Tc.Utils.Monad
=====================================
compiler/GHC/Tc/Utils/TcType.hs
=====================================
@@ -233,7 +233,6 @@ import {-# SOURCE #-} GHC.Tc.Types.Origin
-- others:
import GHC.Driver.Session
-import GHC.Core.FVs
import GHC.Types.Name as Name
-- We use this to make dictionaries for type literals.
-- Perhaps there's a better way to do this?
=====================================
testsuite/tests/indexed-types/should_compile/T22717_fam_orph.hs
=====================================
@@ -1,4 +1,5 @@
{-# LANGUAGE TypeFamilies #-}
+{-# OPTIONS_GHC -Worphans #-}
module T22717_fam_orph where
import T22717_fam_orph_a
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bfb381defa7d8efca56eb184a7538b6239e90151...c9f111263a9dc13783cacce2216d4e53619d618a
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bfb381defa7d8efca56eb184a7538b6239e90151...c9f111263a9dc13783cacce2216d4e53619d618a
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230122/77d6070f/attachment-0001.html>
More information about the ghc-commits
mailing list