Commit 18a346a4 authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot
Browse files

Modules: Core (#13009)

Update submodule: haddock
parent 818b3c38
......@@ -311,27 +311,28 @@ import GHC.Driver.Monad
import TcRnMonad ( finalSafeMode, fixSafeInstances, initIfaceTcRn )
import GHC.Iface.Load ( loadSysInterface )
import TcRnTypes
import Predicate
import GHC.Core.Predicate
import GHC.Driver.Packages
import NameSet
import RdrName
import GHC.Hs
import Type hiding( typeKind )
import GHC.Core.Type hiding( typeKind )
import TcType
import Id
import TysPrim ( alphaTyVars )
import TyCon
import TyCoPpr ( pprForAll )
import Class
import DataCon
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.InstEnv
import Name hiding ( varName )
import Avail
import InstEnv
import FamInstEnv ( FamInst )
import SrcLoc
import GHC.Core
import GHC.Iface.Tidy
import GHC.Driver.Phases ( Phase(..), isHaskellSrcFilename )
import GHC.Driver.Phases ( Phase(..), isHaskellSrcFilename )
import GHC.Driver.Finder
import GHC.Driver.Types
import GHC.Driver.CmdLine
......@@ -356,8 +357,6 @@ import Lexer
import ApiAnnotation
import qualified GHC.LanguageExtensions as LangExt
import NameEnv
import GHC.Core.FVs ( orphNamesOfFamInst )
import FamInstEnv ( famInstEnvElts )
import TcRnDriver
import Inst
import FamInst
......
......@@ -27,7 +27,7 @@ import GHC.Driver.Types
import Name
import NameSet
import Literal
import TyCon
import GHC.Core.TyCon
import FastString
import GHC.StgToCmm.Layout ( ArgRep(..) )
import GHC.Runtime.Heap.Layout
......
......@@ -17,8 +17,8 @@ import GHC.Driver.Session
import GHC.Driver.Types
import Name ( Name, getName )
import NameEnv
import DataCon ( DataCon, dataConRepArgTys, dataConIdentity )
import TyCon ( TyCon, tyConFamilySize, isDataTyCon, tyConDataCons )
import GHC.Core.DataCon ( DataCon, dataConRepArgTys, dataConIdentity )
import GHC.Core.TyCon ( TyCon, tyConFamilySize, isDataTyCon, tyConDataCons )
import GHC.Types.RepType
import GHC.StgToCmm.Layout ( mkVirtConstrSizes )
import GHC.StgToCmm.Closure ( tagForCon, NonVoid (..) )
......
......@@ -25,7 +25,7 @@ import Unique
import Id
import GHC.Core
import Literal
import DataCon
import GHC.Core.DataCon
import VarSet
import PrimOp
import GHC.Runtime.Heap.Layout
......
......@@ -22,7 +22,7 @@ import NameEnv
import Outputable
import PrimOp
import SizedSeq
import Type
import GHC.Core.Type
import SrcLoc
import GHCi.BreakArray
import GHCi.RemoteTypes
......
......@@ -72,7 +72,7 @@ module GHC.Cmm.Utils(
import GhcPrelude
import TyCon ( PrimRep(..), PrimElemRep(..) )
import GHC.Core.TyCon ( PrimRep(..), PrimElemRep(..) )
import GHC.Types.RepType ( UnaryType, SlotTy (..), typePrimRep1 )
import GHC.Runtime.Heap.Layout
......
......@@ -104,13 +104,13 @@ import GhcPrelude
import CostCentre
import VarEnv( InScopeSet )
import Var
import Type
import Coercion
import GHC.Core.Type
import GHC.Core.Coercion
import Name
import NameSet
import NameEnv( NameEnv, emptyNameEnv )
import Literal
import DataCon
import GHC.Core.DataCon
import Module
import BasicTypes
import GHC.Driver.Session
......
......@@ -31,10 +31,10 @@ import Demand
import Var
import VarEnv
import Id
import Type
import TyCon ( initRecTc, checkRecTc )
import Predicate ( isDictTy )
import Coercion
import GHC.Core.Type as Type
import GHC.Core.TyCon ( initRecTc, checkRecTc )
import GHC.Core.Predicate ( isDictTy )
import GHC.Core.Coercion as Coercion
import BasicTypes
import Unique
import GHC.Driver.Session ( DynFlags, GeneralFlag(..), gopt )
......@@ -130,7 +130,7 @@ typeArity ty
| Just (tc,tys) <- splitTyConApp_maybe ty
, Just (ty', _) <- instNewTyCon_maybe tc tys
, Just rec_nts' <- checkRecTc rec_nts tc -- See Note [Expanding newtypes]
-- in TyCon
-- in GHC.Core.TyCon
-- , not (isClassTyCon tc) -- Do not eta-expand through newtype classes
-- -- See Note [Newtype classes and eta expansion]
-- (no longer required)
......
......@@ -5,7 +5,7 @@
{-# LANGUAGE CPP #-}
module Class (
module GHC.Core.Class (
Class,
ClassOpItem,
ClassATItem(..),
......@@ -25,9 +25,9 @@ module Class (
import GhcPrelude
import {-# SOURCE #-} TyCon ( TyCon )
import {-# SOURCE #-} TyCoRep ( Type, PredType )
import {-# SOURCE #-} TyCoPpr ( pprType )
import {-# SOURCE #-} GHC.Core.TyCon ( TyCon )
import {-# SOURCE #-} GHC.Core.TyCo.Rep ( Type, PredType )
import {-# SOURCE #-} GHC.Core.TyCo.Ppr ( pprType )
import Var
import Name
import BasicTypes
......@@ -53,7 +53,7 @@ data Class
= Class {
classTyCon :: TyCon, -- The data type constructor for
-- dictionaries of this class
-- See Note [ATyCon for classes] in TyCoRep
-- See Note [ATyCon for classes] in GHC.Core.TyCo.Rep
className :: Name, -- Just the cached name of the TyCon
classKey :: Unique, -- Cached unique of TyCon
......
......@@ -9,7 +9,7 @@
-- as used in System FC. See 'GHC.Core.Expr' for
-- more on System FC and how coercions fit into it.
--
module Coercion (
module GHC.Core.Coercion (
-- * Main data type
Coercion, CoercionN, CoercionR, CoercionP, MCoercion(..), MCoercionR,
UnivCoProvenance, CoercionHole(..), coHoleCoVar, setCoHoleCoVar,
......@@ -121,14 +121,14 @@ import {-# SOURCE #-} GHC.CoreToIface (toIfaceTyCon, tidyToIfaceTcArgs)
import GhcPrelude
import GHC.Iface.Type
import TyCoRep
import TyCoFVs
import TyCoPpr
import TyCoSubst
import TyCoTidy
import Type
import TyCon
import CoAxiom
import GHC.Core.TyCo.Rep
import GHC.Core.TyCo.FVs
import GHC.Core.TyCo.Ppr
import GHC.Core.TyCo.Subst
import GHC.Core.TyCo.Tidy
import GHC.Core.Type
import GHC.Core.TyCon
import GHC.Core.Coercion.Axiom
import Var
import VarEnv
import VarSet
......@@ -155,7 +155,7 @@ import Data.Char( isDigit )
-- The coercion arguments always *precisely* saturate
-- arity of (that branch of) the CoAxiom. If there are
-- any left over, we use AppCo. See
-- See [Coercion axioms applied to coercions] in TyCoRep
-- See [Coercion axioms applied to coercions] in GHC.Core.TyCo.Rep
\subsection{Coercion variables}
%* *
......@@ -185,7 +185,7 @@ Defined here to avoid module loops. CoAxiom is loaded very early on.
etaExpandCoAxBranch :: CoAxBranch -> ([TyVar], [Type], Type)
-- Return the (tvs,lhs,rhs) after eta-expanding,
-- to the way in which the axiom was originally written
-- See Note [Eta reduction for data families] in CoAxiom
-- See Note [Eta reduction for data families] in GHC.Core.Coercion.Axiom
etaExpandCoAxBranch (CoAxBranch { cab_tvs = tvs
, cab_eta_tvs = eta_tvs
, cab_lhs = lhs
......@@ -241,7 +241,7 @@ ppr_co_ax_branch ppr_rhs fam_tc branch
-- Eta-expand LHS and RHS types, because sometimes data family
-- instances are eta-reduced.
-- See Note [Eta reduction for data families] in FamInstEnv.
-- See Note [Eta reduction for data families] in GHC.Core.FamInstEnv.
(ee_tvs, ee_lhs, ee_rhs) = etaExpandCoAxBranch branch