diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-03-02 11:43:03 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-03-16 23:53:24 -0400 |
commit | 18a346a4b5a02b8c62e8eedb91b35c2d8e754b96 (patch) | |
tree | 59121ffd5a46c1987a184db3842a3089f6250d11 /compiler/prelude | |
parent | 818b3c38e7548f4720815f76969238d82c9650f7 (diff) | |
download | haskell-18a346a4b5a02b8c62e8eedb91b35c2d8e754b96.tar.gz |
Modules: Core (#13009)
Update submodule: haddock
Diffstat (limited to 'compiler/prelude')
-rw-r--r-- | compiler/prelude/KnownUniques.hs | 4 | ||||
-rw-r--r-- | compiler/prelude/PrelInfo.hs | 8 | ||||
-rw-r--r-- | compiler/prelude/PrelRules.hs | 13 | ||||
-rw-r--r-- | compiler/prelude/PrimOp.hs | 6 | ||||
-rw-r--r-- | compiler/prelude/TysPrim.hs | 12 | ||||
-rw-r--r-- | compiler/prelude/TysWiredIn.hs | 14 | ||||
-rw-r--r-- | compiler/prelude/TysWiredIn.hs-boot | 4 |
7 files changed, 31 insertions, 30 deletions
diff --git a/compiler/prelude/KnownUniques.hs b/compiler/prelude/KnownUniques.hs index 00085cad0b..1d292d899b 100644 --- a/compiler/prelude/KnownUniques.hs +++ b/compiler/prelude/KnownUniques.hs @@ -29,8 +29,8 @@ module KnownUniques import GhcPrelude import TysWiredIn -import TyCon -import DataCon +import GHC.Core.TyCon +import GHC.Core.DataCon import Id import BasicTypes import Outputable diff --git a/compiler/prelude/PrelInfo.hs b/compiler/prelude/PrelInfo.hs index 55ceb047a8..6ecb106efa 100644 --- a/compiler/prelude/PrelInfo.hs +++ b/compiler/prelude/PrelInfo.hs @@ -51,13 +51,13 @@ import GhcPrelude import KnownUniques import Unique ( isValidKnownKeyUnique ) -import ConLike ( ConLike(..) ) +import GHC.Core.ConLike ( ConLike(..) ) import THNames ( templateHaskellNames ) import PrelNames import PrelRules import Avail import PrimOp -import DataCon +import GHC.Core.DataCon import Id import Name import NameEnv @@ -66,8 +66,8 @@ import Outputable import TysPrim import TysWiredIn import GHC.Driver.Types -import Class -import TyCon +import GHC.Core.Class +import GHC.Core.TyCon import UniqFM import Util import TcTypeNats ( typeNatTyCons ) diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs index 643bcae06d..9b2047d521 100644 --- a/compiler/prelude/PrelRules.hs +++ b/compiler/prelude/PrelRules.hs @@ -37,14 +37,15 @@ import GHC.Core.SimpleOpt ( exprIsLiteral_maybe ) import PrimOp ( PrimOp(..), tagToEnumKey ) import TysWiredIn import TysPrim -import TyCon ( tyConDataCons_maybe, isAlgTyCon, isEnumerationTyCon - , isNewTyCon, unwrapNewTyCon_maybe, tyConDataCons - , tyConFamilySize ) -import DataCon ( dataConTagZ, dataConTyCon, dataConWrapId, dataConWorkId ) +import GHC.Core.TyCon + ( tyConDataCons_maybe, isAlgTyCon, isEnumerationTyCon + , isNewTyCon, unwrapNewTyCon_maybe, tyConDataCons + , tyConFamilySize ) +import GHC.Core.DataCon ( dataConTagZ, dataConTyCon, dataConWrapId, dataConWorkId ) import GHC.Core.Utils ( cheapEqExpr, cheapEqExpr', exprIsHNF, exprType , stripTicksTop, stripTicksTopT, mkTicks ) import GHC.Core.Unfold ( exprIsConApp_maybe ) -import Type +import GHC.Core.Type import OccName ( occNameFS ) import PrelNames import Maybes ( orElse ) @@ -55,7 +56,7 @@ import BasicTypes import GHC.Driver.Session import GHC.Platform import Util -import Coercion (mkUnbranchedAxInstCo,mkSymCo,Role(..)) +import GHC.Core.Coercion (mkUnbranchedAxInstCo,mkSymCo,Role(..)) import Control.Applicative ( Alternative(..) ) diff --git a/compiler/prelude/PrimOp.hs b/compiler/prelude/PrimOp.hs index ecce2e791f..4d0bbcee66 100644 --- a/compiler/prelude/PrimOp.hs +++ b/compiler/prelude/PrimOp.hs @@ -36,9 +36,9 @@ import Id ( Id, mkVanillaGlobalWithInfo ) import IdInfo ( vanillaIdInfo, setCafInfo, CafInfo(NoCafRefs) ) import Name import PrelNames ( gHC_PRIMOPWRAPPERS ) -import TyCon ( TyCon, isPrimTyCon, PrimRep(..) ) -import Type -import GHC.Types.RepType ( typePrimRep1, tyConPrimRep1 ) +import GHC.Core.TyCon ( TyCon, isPrimTyCon, PrimRep(..) ) +import GHC.Core.Type +import GHC.Types.RepType ( typePrimRep1, tyConPrimRep1 ) import BasicTypes ( Arity, Fixity(..), FixityDirection(..), Boxity(..), SourceText(..) ) import SrcLoc ( wiredInSrcSpan ) diff --git a/compiler/prelude/TysPrim.hs b/compiler/prelude/TysPrim.hs index 7a3a8df8ae..e9cdb81fc8 100644 --- a/compiler/prelude/TysPrim.hs +++ b/compiler/prelude/TysPrim.hs @@ -112,14 +112,14 @@ import {-# SOURCE #-} TysWiredIn import Var ( TyVar, mkTyVar ) import Name -import TyCon +import GHC.Core.TyCon import SrcLoc import Unique import PrelNames import FastString import Outputable -import TyCoRep -- Doesn't need special access, but this is easier to avoid - -- import loops which show up if you import Type instead +import GHC.Core.TyCo.Rep -- Doesn't need special access, but this is easier to avoid + -- import loops which show up if you import Type instead import Data.Char @@ -475,14 +475,14 @@ generator never has to manipulate a value of type 'a :: TYPE rr'. Note [PrimRep and kindPrimRep] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -As part of its source code, in TyCon, GHC has +As part of its source code, in GHC.Core.TyCon, GHC has data PrimRep = LiftedRep | UnliftedRep | IntRep | FloatRep | ...etc... Notice that * RuntimeRep is part of the syntax tree of the program being compiled (defined in a library: ghc-prim:GHC.Types) * PrimRep is part of GHC's source code. - (defined in TyCon) + (defined in GHC.Core.TyCon) We need to get from one to the other; that is what kindPrimRep does. Suppose we have a value @@ -707,7 +707,7 @@ It responds "yes" to Type.isEqPrimPred and classifies as an EqPred in Type.classifyPredType. All wanted constraints of this type are built with coercion holes. -(See Note [Coercion holes] in TyCoRep.) But see also +(See Note [Coercion holes] in GHC.Core.TyCo.Rep.) But see also Note [Deferred errors for coercion holes] in TcErrors to see how equality constraints are deferred. diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs index ff28acce8d..908b0e1566 100644 --- a/compiler/prelude/TysWiredIn.hs +++ b/compiler/prelude/TysWiredIn.hs @@ -140,16 +140,16 @@ import TysPrim import {-# SOURCE #-} KnownUniques -- others: -import CoAxiom +import GHC.Core.Coercion.Axiom import Id import Constants ( mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE, mAX_SUM_SIZE ) import Module ( Module ) -import Type +import GHC.Core.Type import GHC.Types.RepType -import DataCon -import {-# SOURCE #-} ConLike -import TyCon -import Class ( Class, mkClass ) +import GHC.Core.DataCon +import {-# SOURCE #-} GHC.Core.ConLike +import GHC.Core.TyCon +import GHC.Core.Class ( Class, mkClass ) import RdrName import Name import NameEnv ( NameEnv, mkNameEnv, lookupNameEnv, lookupNameEnv_NF ) @@ -933,7 +933,7 @@ mk_tuple Unboxed arity = (tycon, tuple_con) tycon = mkTupleTyCon tc_name tc_binders tc_res_kind tc_arity tuple_con UnboxedTuple flavour - -- See Note [Unboxed tuple RuntimeRep vars] in TyCon + -- See Note [Unboxed tuple RuntimeRep vars] in GHC.Core.TyCon -- Kind: forall (k1:RuntimeRep) (k2:RuntimeRep). TYPE k1 -> TYPE k2 -> # tc_binders = mkTemplateTyConBinders (replicate arity runtimeRepTy) (\ks -> map tYPE ks) diff --git a/compiler/prelude/TysWiredIn.hs-boot b/compiler/prelude/TysWiredIn.hs-boot index b76f58410a..7fe222b825 100644 --- a/compiler/prelude/TysWiredIn.hs-boot +++ b/compiler/prelude/TysWiredIn.hs-boot @@ -1,7 +1,7 @@ module TysWiredIn where -import {-# SOURCE #-} TyCon ( TyCon ) -import {-# SOURCE #-} TyCoRep (Type, Kind) +import {-# SOURCE #-} GHC.Core.TyCon ( TyCon ) +import {-# SOURCE #-} GHC.Core.TyCo.Rep (Type, Kind) import BasicTypes (Arity, TupleSort) import Name (Name) |