diff options
author | Richard Eisenberg <rae@richarde.dev> | 2021-05-28 18:00:59 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-29 10:18:37 -0400 |
commit | 6db8a0f76ec45d47060e28bb303e9eef60bdb16b (patch) | |
tree | 40c95b50485a46237a71a664874d38015c75c5de /compiler/GHC/Tc/Utils/TcType.hs | |
parent | 0f8872ecac49b2e4075e64ac93269a4a78d69cff (diff) | |
download | haskell-6db8a0f76ec45d47060e28bb303e9eef60bdb16b.tar.gz |
Rip GHC.Tc.Solver.Monad asunder (only)
This creates new modules GHC.Tc.Solver.InertSet and
GHC.Tc.Solver.Types. The Monad module is still pretty
big, but this is an improvement. Moreover, it means
that GHC.HsToCore.Pmc.Solver.Types no longer depends
on the constraint solver (it now depends on GHC.Tc.Solver.InertSet),
making the error-messages work easier.
This patch thus contributes to #18516.
Diffstat (limited to 'compiler/GHC/Tc/Utils/TcType.hs')
-rw-r--r-- | compiler/GHC/Tc/Utils/TcType.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Utils/TcType.hs b/compiler/GHC/Tc/Utils/TcType.hs index 183fe396ef..1a7e80bd96 100644 --- a/compiler/GHC/Tc/Utils/TcType.hs +++ b/compiler/GHC/Tc/Utils/TcType.hs @@ -840,7 +840,7 @@ any_rewritable :: Bool -- Ignore casts and coercions -- role-agnostic, and this one must be role-aware. We could make -- foldTyCon role-aware, but that may slow down more common usages. -- --- See Note [Rewritable] in GHC.Tc.Solver.Monad for a specification for this function. +-- See Note [Rewritable] in GHC.Tc.Solver.InertSet for a specification for this function. {-# INLINE any_rewritable #-} -- this allows specialization of predicates any_rewritable ignore_cos role tv_pred tc_pred should_expand = go role emptyVarSet @@ -889,7 +889,7 @@ anyRewritableTyVar :: Bool -- Ignore casts and coercions -> EqRel -- Ambient role -> (EqRel -> TcTyVar -> Bool) -- check tyvar -> TcType -> Bool --- See Note [Rewritable] in GHC.Tc.Solver.Monad for a specification for this function. +-- See Note [Rewritable] in GHC.Tc.Solver.InertSet for a specification for this function. anyRewritableTyVar ignore_cos role pred = any_rewritable ignore_cos role pred (\ _ _ _ -> False) -- no special check for tyconapps @@ -906,14 +906,14 @@ anyRewritableTyFamApp :: EqRel -- Ambient role -- should return True only for type family applications -> TcType -> Bool -- always ignores casts & coercions --- See Note [Rewritable] in GHC.Tc.Solver.Monad for a specification for this function. +-- See Note [Rewritable] in GHC.Tc.Solver.InertSet for a specification for this function. anyRewritableTyFamApp role check_tyconapp = any_rewritable True role (\ _ _ -> False) check_tyconapp (not . isFamFreeTyCon) -- This version is used by shouldSplitWD. It *does* look in casts -- and coercions, and it always expands type synonyms whose RHSs mention -- type families. --- See Note [Rewritable] in GHC.Tc.Solver.Monad for a specification for this function. +-- See Note [Rewritable] in GHC.Tc.Solver.InertSet for a specification for this function. anyRewritableCanEqLHS :: EqRel -- Ambient role -> (EqRel -> TcTyVar -> Bool) -- check tyvar -> (EqRel -> TyCon -> [TcType] -> Bool) -- check type family |