diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-07-25 19:41:12 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-31 04:27:59 -0400 |
commit | 371dadfbbc35abfcd41c41b6e92745d87bd48cd5 (patch) | |
tree | 5e1436c69284cee19a15e19a820f5ad6d822da47 /compiler/iface | |
parent | 2829f6dab5e860e61dba970a536709380c9d993d (diff) | |
download | haskell-371dadfbbc35abfcd41c41b6e92745d87bd48cd5.tar.gz |
Break up TyCoRep
This breaks up the monstrous TyCoReps module into several new modules by
topic:
* TyCoRep: Contains the `Coercion`, `Type`, and related type
definitions and a few simple predicates but nothing further
* TyCoPpr: Contains the the pretty-printer logic
* TyCoFVs: Contains the free variable computations (and
`tyConAppNeedsKindSig`, although I suspect this should change)
* TyCoSubst: Contains the substitution logic for types and coercions
* TyCoTidy: Contains the tidying logic for types
While we are able to eliminate a good number of `SOURCE` imports (and
make a few others smaller) with this change, we must introduce one new
`hs-boot` file for `TyCoPpr` so that `TyCoRep` can define `Outputable`
instances for the types it defines.
Metric Increase:
haddock.Cabal
haddock.compiler
Diffstat (limited to 'compiler/iface')
-rw-r--r-- | compiler/iface/IfaceType.hs | 2 | ||||
-rw-r--r-- | compiler/iface/TcIface.hs | 1 | ||||
-rw-r--r-- | compiler/iface/ToIface.hs | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/compiler/iface/IfaceType.hs b/compiler/iface/IfaceType.hs index 298e14e463..9e7021bcc9 100644 --- a/compiler/iface/IfaceType.hs +++ b/compiler/iface/IfaceType.hs @@ -1075,7 +1075,7 @@ pprIfaceSigmaType show_forall ty pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc pprUserIfaceForAll tvs = sdocWithDynFlags $ \dflags -> - -- See Note [When to print foralls] + -- See Note [When to print foralls] in this module. ppWhen (any tv_has_kind_var tvs || any tv_is_required tvs || gopt Opt_PrintExplicitForalls dflags) $ diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs index 5c3b64af0f..1e9fe4fbfa 100644 --- a/compiler/iface/TcIface.hs +++ b/compiler/iface/TcIface.hs @@ -35,6 +35,7 @@ import Type import Coercion import CoAxiom import TyCoRep -- needs to build types & coercions in a knot +import TyCoSubst ( substTyCoVars ) import HscTypes import Annotations import InstEnv diff --git a/compiler/iface/ToIface.hs b/compiler/iface/ToIface.hs index 535c1080f2..f20fed214a 100644 --- a/compiler/iface/ToIface.hs +++ b/compiler/iface/ToIface.hs @@ -68,6 +68,7 @@ import Var import VarEnv import VarSet import TyCoRep +import TyCoTidy ( tidyCo ) import Demand ( isTopSig ) import Data.Maybe ( catMaybes ) |