diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-01-02 19:13:44 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-01-06 18:39:22 -0500 |
commit | 99a9f51bf8207c79241fc0b685fadeb222a61292 (patch) | |
tree | 63daf74031c47b7a680477a21bba505bf2d32701 /compiler/types | |
parent | 5ffea0c6c6a2670fd6819540f3ea61ce6620caaa (diff) | |
download | haskell-99a9f51bf8207c79241fc0b685fadeb222a61292.tar.gz |
Module hierarchy: Iface (cf #13009)
Diffstat (limited to 'compiler/types')
-rw-r--r-- | compiler/types/Coercion.hs | 6 | ||||
-rw-r--r-- | compiler/types/FamInstEnv.hs | 2 | ||||
-rw-r--r-- | compiler/types/InstEnv.hs | 2 | ||||
-rw-r--r-- | compiler/types/TyCoPpr.hs | 12 | ||||
-rw-r--r-- | compiler/types/TyCoRep.hs | 2 | ||||
-rw-r--r-- | compiler/types/TyCon.hs | 2 | ||||
-rw-r--r-- | compiler/types/Type.hs | 4 |
7 files changed, 16 insertions, 14 deletions
diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs index 16db7c5f6c..8a8fc3d838 100644 --- a/compiler/types/Coercion.hs +++ b/compiler/types/Coercion.hs @@ -116,11 +116,11 @@ module Coercion ( #include "HsVersions.h" -import {-# SOURCE #-} ToIface (toIfaceTyCon, tidyToIfaceTcArgs) +import {-# SOURCE #-} GHC.CoreToIface (toIfaceTyCon, tidyToIfaceTcArgs) import GhcPrelude -import IfaceType +import GHC.Iface.Type import TyCoRep import TyCoFVs import TyCoPpr @@ -231,7 +231,7 @@ ppr_co_ax_branch :: (TidyEnv -> Type -> SDoc) ppr_co_ax_branch ppr_rhs fam_tc branch = foldr1 (flip hangNotEmpty 2) [ pprUserForAll (mkTyCoVarBinders Inferred bndrs') - -- See Note [Printing foralls in type family instances] in IfaceType + -- See Note [Printing foralls in type family instances] in GHC.Iface.Type , pp_lhs <+> ppr_rhs tidy_env ee_rhs , text "-- Defined" <+> pp_loc ] where diff --git a/compiler/types/FamInstEnv.hs b/compiler/types/FamInstEnv.hs index a21933c631..0cf329c4ca 100644 --- a/compiler/types/FamInstEnv.hs +++ b/compiler/types/FamInstEnv.hs @@ -245,7 +245,7 @@ pprFamInsts finsts = vcat (map pprFamInst finsts) Note [Lazy axiom match] ~~~~~~~~~~~~~~~~~~~~~~~ It is Vitally Important that mkImportedFamInst is *lazy* in its axiom -parameter. The axiom is loaded lazily, via a forkM, in TcIface. Sometime +parameter. The axiom is loaded lazily, via a forkM, in GHC.IfaceToCore. Sometime later, mkImportedFamInst is called using that axiom. However, the axiom may itself depend on entities which are not yet loaded as of the time of the mkImportedFamInst. Thus, if mkImportedFamInst eagerly looks at the diff --git a/compiler/types/InstEnv.hs b/compiler/types/InstEnv.hs index 13a0b30555..e9960978d5 100644 --- a/compiler/types/InstEnv.hs +++ b/compiler/types/InstEnv.hs @@ -320,7 +320,7 @@ mkImportedInstance cls_nm mb_tcs dfun_name dfun oflag orphan {- Note [When exactly is an instance decl an orphan?] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - (see MkIface.instanceToIfaceInst, which implements this) + (see GHC.Iface.Utils.instanceToIfaceInst, which implements this) Roughly speaking, an instance is an orphan if its head (after the =>) mentions nothing defined in this module. diff --git a/compiler/types/TyCoPpr.hs b/compiler/types/TyCoPpr.hs index e46b299cc5..fbbdfbd7a0 100644 --- a/compiler/types/TyCoPpr.hs +++ b/compiler/types/TyCoPpr.hs @@ -27,8 +27,10 @@ module TyCoPpr import GhcPrelude -import {-# SOURCE #-} ToIface( toIfaceTypeX, toIfaceTyLit, toIfaceForAllBndr - , toIfaceTyCon, toIfaceTcArgs, toIfaceCoercionX ) +import {-# SOURCE #-} GHC.CoreToIface + ( toIfaceTypeX, toIfaceTyLit, toIfaceForAllBndr + , toIfaceTyCon, toIfaceTcArgs, toIfaceCoercionX ) + import {-# SOURCE #-} DataCon( dataConFullSig , dataConUserTyVarBinders , DataCon ) @@ -42,7 +44,7 @@ import TyCoFVs import Class import Var -import IfaceType +import GHC.Iface.Type import VarSet import VarEnv @@ -68,7 +70,7 @@ parens around the type, except for the atomic cases. @pprParendType@ works just by setting the initial context precedence very high. Note that any function which pretty-prints a @Type@ first converts the @Type@ -to an @IfaceType@. See Note [IfaceType and pretty-printing] in IfaceType. +to an @IfaceType@. See Note [IfaceType and pretty-printing] in GHC.Iface.Type. See Note [Precedence in types] in BasicTypes. -} @@ -76,7 +78,7 @@ See Note [Precedence in types] in BasicTypes. -------------------------------------------------------- -- When pretty-printing types, we convert to IfaceType, -- and pretty-print that. --- See Note [Pretty printing via IfaceSyn] in PprTyThing +-- See Note [Pretty printing via Iface syntax] in PprTyThing -------------------------------------------------------- pprType, pprParendType :: Type -> SDoc diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs index be2f74c731..b1ecf74d3d 100644 --- a/compiler/types/TyCoRep.hs +++ b/compiler/types/TyCoRep.hs @@ -76,7 +76,7 @@ import {-# SOURCE #-} TyCoPpr ( pprType, pprCo, pprTyLit ) import {-# SOURCE #-} ConLike ( ConLike(..), conLikeName ) -- friends: -import IfaceType +import GHC.Iface.Type import Var import VarSet import Name hiding ( varName ) diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs index 9157c33c4e..ea3ef90b49 100644 --- a/compiler/types/TyCon.hs +++ b/compiler/types/TyCon.hs @@ -479,7 +479,7 @@ isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool isInvisibleTyConBinder tcb = not (isVisibleTyConBinder tcb) -- Build the 'tyConKind' from the binders and the result kind. --- Keep in sync with 'mkTyConKind' in iface/IfaceType. +-- Keep in sync with 'mkTyConKind' in GHC.Iface.Type. mkTyConKind :: [TyConBinder] -> Kind -> Kind mkTyConKind bndrs res_kind = foldr mk res_kind bndrs where diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs index 749578d78f..4e32824b09 100644 --- a/compiler/types/Type.hs +++ b/compiler/types/Type.hs @@ -1170,7 +1170,7 @@ We have :: * -> * -> * So again we must instantiate. -The same thing happens in ToIface.toIfaceAppArgsX. +The same thing happens in GHC.CoreToIface.toIfaceAppArgsX. --------------------------------------------------------------------- @@ -2937,7 +2937,7 @@ classifiesTypeWithValues k = isJust (kindRep_maybe k) %* * %************************************************************************ -Most pretty-printing is either in TyCoRep or IfaceType. +Most pretty-printing is either in TyCoRep or GHC.Iface.Type. -} |