...
 
Commits (3)
......@@ -63,8 +63,8 @@ import GHC.Data.FastString
import GHC.Utils.Misc
import GHC.Core.InstEnv ( instanceDFunId )
import GHC.Core.Coercion.Opt ( checkAxInstCo )
import GHC.Core.Arity ( typeArity )
import GHC.Types.Demand ( splitStrictSig, isDeadEndDiv )
import GHC.Core.Opt.Arity ( typeArity )
import GHC.Types.Demand ( splitStrictSig, isDeadEndDiv )
import GHC.Driver.Types
import GHC.Driver.Session
......@@ -1735,7 +1735,7 @@ argument to be made for allowing a situation like this:
Applying this rule can't turn a well-typed program into an ill-typed one, so
conceivably we could allow it. But we can always eta-expand such an
"undersaturated" rule (see 'GHC.Core.Arity.etaExpandToJoinPointRule'), and in fact
"undersaturated" rule (see 'GHC.Core.Opt.Arity.etaExpandToJoinPointRule'), and in fact
the simplifier would have to in order to deal with the RHS. So we take a
conservative view and don't allow undersaturated rules for join points. See
Note [Rules and join points] in OccurAnal for further discussion.
......
......@@ -11,7 +11,7 @@
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
-- | Arity and eta expansion
module GHC.Core.Arity
module GHC.Core.Opt.Arity
( manifestArity, joinRhsArity, exprArity, typeArity
, exprEtaExpandArity, findRhsArity, etaExpand
, etaExpandToJoinPoint, etaExpandToJoinPointRule
......@@ -1136,7 +1136,7 @@ mkEtaWW orig_n ppr_orig_expr in_scope orig_ty
-- TODO Check if we actually *are* changing any join points' types
subst_expr :: Subst -> CoreExpr -> CoreExpr
subst_expr = substExpr (text "GHC.Core.Arity:substExpr")
subst_expr = substExpr (text "GHC.Core.Opt.Arity:substExpr")
--------------
......
......@@ -16,7 +16,7 @@ import GHC.Driver.Session ( DynFlags )
import GHC.Types.Basic
import GHC.Core
import GHC.Types.Id
import GHC.Core.Arity ( typeArity )
import GHC.Core.Opt.Arity ( typeArity )
import GHC.Core.Utils ( exprIsCheap, exprIsTrivial )
import GHC.Data.Graph.UnVar
import GHC.Types.Demand
......@@ -384,7 +384,7 @@ the case for Core!
1. We need to ensure the invariant
callArity e <= typeArity (exprType e)
for the same reasons that exprArity needs this invariant (see Note
[exprArity invariant] in GHC.Core.Arity).
[exprArity invariant] in GHC.Core.Opt.Arity).
If we are not doing that, a too-high arity annotation will be stored with
the id, confusing the simplifier later on.
......
......@@ -880,9 +880,9 @@ we want plusInt's strictness to propagate to foo! But because it has
no manifest lambdas, it won't do so automatically, and indeed 'co' might
have type (Int->Int->Int) ~ T.
Fortunately, GHC.Core.Arity gives 'foo' arity 2, which is enough for LetDown to
Fortunately, GHC.Core.Opt.Arity gives 'foo' arity 2, which is enough for LetDown to
forward plusInt's demand signature, and all is well (see Note [Newtype arity] in
GHC.Core.Arity)! A small example is the test case NewtypeArity.
GHC.Core.Opt.Arity)! A small example is the test case NewtypeArity.
Historical Note [Product demands for function body]
......
......@@ -15,7 +15,7 @@ import GHC.Prelude
import GHC.Core
import GHC.Core.Utils
import GHC.Core.Make
import GHC.Core.Arity ( etaExpand )
import GHC.Core.Opt.Arity ( etaExpand )
import GHC.Core.Opt.Monad ( FloatOutSwitches(..) )
import GHC.Driver.Session
......
......@@ -24,7 +24,7 @@ import GHC.Core
import GHC.Core.FVs
import GHC.Core.Utils ( exprIsTrivial, isDefaultAlt, isExpandableApp,
stripTicksTopE, mkTicks )
import GHC.Core.Arity ( joinRhsArity )
import GHC.Core.Opt.Arity ( joinRhsArity )
import GHC.Types.Id
import GHC.Types.Id.Info
import GHC.Types.Basic
......
......@@ -74,7 +74,7 @@ import GHC.Core.Utils ( exprType, exprIsHNF
, isExprLevPoly
, collectMakeStaticArgs
)
import GHC.Core.Arity ( exprBotStrictness_maybe )
import GHC.Core.Opt.Arity ( exprBotStrictness_maybe )
import GHC.Core.FVs -- all of it
import GHC.Core.Subst
import GHC.Core.Make ( sortQuantVars )
......
......@@ -785,7 +785,7 @@ propagate the info that x's RHS is bottom to x's IdInfo as rapidly as
possible.
We use tryEtaExpandRhs on every binding, and it turns ou that the
arity computation it performs (via GHC.Core.Arity.findRhsArity) already
arity computation it performs (via GHC.Core.Opt.Arity.findRhsArity) already
does a simple bottoming-expression analysis. So all we need to do
is propagate that info to the binder's IdInfo.
......
......@@ -49,7 +49,7 @@ import GHC.Core.Ppr
import GHC.Core.TyCo.Ppr ( pprParendType )
import GHC.Core.FVs
import GHC.Core.Utils
import GHC.Core.Arity
import GHC.Core.Opt.Arity
import GHC.Core.Unfold
import GHC.Types.Name
import GHC.Types.Id
......@@ -1554,7 +1554,7 @@ Note [Eta-expanding at let bindings]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We now eta expand at let-bindings, which is where the payoff comes.
The most significant thing is that we can do a simple arity analysis
(in GHC.Core.Arity.findRhsArity), which we can't do for free-floating lambdas
(in GHC.Core.Opt.Arity.findRhsArity), which we can't do for free-floating lambdas
One useful consequence of not eta-expanding lambdas is this example:
genMap :: C a => ...
......
......@@ -33,7 +33,7 @@ import GHC.Core.SimpleOpt ( collectBindersPushingCo )
import GHC.Core.Utils ( exprIsTrivial, getIdFromTrivialExpr_maybe
, mkCast, exprType )
import GHC.Core.FVs
import GHC.Core.Arity ( etaExpandToJoinPointRule )
import GHC.Core.Opt.Arity ( etaExpandToJoinPointRule )
import GHC.Types.Unique.Supply
import GHC.Types.Name
import GHC.Types.Id.Make ( voidArgId, voidPrimId )
......
......@@ -9,7 +9,7 @@ module GHC.Core.Opt.WorkWrap ( wwTopBinds ) where
import GHC.Prelude
import GHC.Core.Arity ( manifestArity )
import GHC.Core.Opt.Arity ( manifestArity )
import GHC.Core
import GHC.Core.Unfold ( certainlyWillInline, mkWwInlineRule, mkWorkerUnfolding )
import GHC.Core.Utils ( exprType, exprIsHNF )
......@@ -534,12 +534,12 @@ Note [Zapping DmdEnv after Demand Analyzer] above.
Note [Don't eta expand in w/w]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A binding where the manifestArity of the RHS is less than idArity of the binder
means GHC.Core.Arity didn't eta expand that binding. When this happens, it does so
for a reason (see Note [exprArity invariant] in GHC.Core.Arity) and we probably have
means GHC.Core.Opt.Arity didn't eta expand that binding. When this happens, it does so
for a reason (see Note [exprArity invariant] in GHC.Core.Opt.Arity) and we probably have
a PAP, cast or trivial expression as RHS.
Performing the worker/wrapper split will implicitly eta-expand the binding to
idArity, overriding GHC.Core.Arity's decision. Other than playing fast and loose with
idArity, overriding GHC.Core.Opt.Arity's decision. Other than playing fast and loose with
divergence, it's also broken for newtypes:
f = (\xy.blah) |> co
......
......@@ -22,7 +22,7 @@ module GHC.Core.SimpleOpt (
import GHC.Prelude
import GHC.Core.Arity( etaExpandToJoinPoint )
import GHC.Core.Opt.Arity( etaExpandToJoinPoint )
import GHC.Core
import GHC.Core.Subst
......
......@@ -50,7 +50,7 @@ import GHC.Driver.Session
import GHC.Core
import GHC.Core.Opt.OccurAnal ( occurAnalyseExpr )
import GHC.Core.SimpleOpt
import GHC.Core.Arity ( manifestArity )
import GHC.Core.Opt.Arity ( manifestArity )
import GHC.Core.Utils
import GHC.Types.Id
import GHC.Types.Demand ( StrictSig, isDeadEndSig )
......
......@@ -1033,7 +1033,7 @@ getIdFromTrivialExpr_maybe e
{-
exprIsDeadEnd is a very cheap and cheerful function; it may return
False for bottoming expressions, but it never costs much to ask. See
also GHC.Core.Arity.exprBotStrictness_maybe, but that's a bit more
also GHC.Core.Opt.Arity.exprBotStrictness_maybe, but that's a bit more
expensive.
-}
......
......@@ -20,7 +20,7 @@ import GHC.Prelude
import GHC.Core
import GHC.Core.Utils ( exprType, findDefault, isJoinBind
, exprIsTickedString_maybe )
import GHC.Core.Arity ( manifestArity )
import GHC.Core.Opt.Arity ( manifestArity )
import GHC.Stg.Syntax
import GHC.Core.Type
......
......@@ -26,7 +26,7 @@ import GHC.Driver.Types
import GHC.Builtin.Names
import GHC.Types.Id.Make ( realWorldPrimId )
import GHC.Core.Utils
import GHC.Core.Arity
import GHC.Core.Opt.Arity
import GHC.Core.FVs
import GHC.Core.Opt.Monad ( CoreToDo(..) )
import GHC.Core.Lint ( endPassIO )
......@@ -1136,7 +1136,7 @@ After ANFing we get
and now we do NOT want eta expansion to give
f = /\a -> \ y -> (let s = h 3 in g s) y
Instead GHC.Core.Arity.etaExpand gives
Instead GHC.Core.Opt.Arity.etaExpand gives
f = /\a -> \y -> let s = h 3 in g s y
-}
......
......@@ -25,7 +25,7 @@ module GHC.Hs (
module GHC.Hs.ImpExp,
module GHC.Hs.Lit,
module GHC.Hs.Pat,
module GHC.Hs.Types,
module GHC.Hs.Type,
module GHC.Hs.Utils,
module GHC.Hs.Doc,
module GHC.Hs.Extension,
......@@ -44,7 +44,7 @@ import GHC.Hs.ImpExp
import GHC.Hs.Lit
import GHC.Hs.Extension
import GHC.Hs.Pat
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Types.Basic ( Fixity, WarningTxt )
import GHC.Hs.Utils
import GHC.Hs.Doc
......
......@@ -31,7 +31,7 @@ import {-# SOURCE #-} GHC.Hs.Expr ( pprExpr, LHsExpr,
import {-# SOURCE #-} GHC.Hs.Pat ( LPat )
import GHC.Hs.Extension
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Core
import GHC.Tc.Types.Evidence
import GHC.Core.Type
......
......@@ -101,7 +101,7 @@ import {-# SOURCE #-} GHC.Hs.Expr( HsExpr, HsSplice, pprExpr,
-- Because Expr imports Decls via HsBracket
import GHC.Hs.Binds
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Hs.Doc
import GHC.Core.TyCon
import GHC.Types.Basic
......
......@@ -33,7 +33,7 @@ import GHC.Hs.Decls
import GHC.Hs.Pat
import GHC.Hs.Lit
import GHC.Hs.Extension
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Hs.Binds
-- others:
......
......@@ -22,7 +22,7 @@ import GHC.Hs.Binds
import GHC.Hs.Decls
import GHC.Hs.Expr
import GHC.Hs.Lit
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Hs.Pat
import GHC.Hs.ImpExp
......@@ -369,7 +369,7 @@ deriving instance (Data body) => Data (HsRecFields GhcRn body)
deriving instance (Data body) => Data (HsRecFields GhcTc body)
-- ---------------------------------------------------------------------
-- Data derivations from GHC.Hs.Types ----------------------------------
-- Data derivations from GHC.Hs.Type ----------------------------------
-- deriving instance (DataIdLR p p) => Data (LHsQTyVars p)
deriving instance Data (LHsQTyVars GhcPs)
......
......@@ -58,7 +58,7 @@ import {-# SOURCE #-} GHC.Hs.Expr (SyntaxExpr, LHsExpr, HsSplice, pprLExpr, pprS
import GHC.Hs.Binds
import GHC.Hs.Lit
import GHC.Hs.Extension
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Tc.Types.Evidence
import GHC.Types.Basic
-- others:
......
......@@ -3,7 +3,7 @@
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
GHC.Hs.Types: Abstract syntax: user-defined types
GHC.Hs.Type: Abstract syntax: user-defined types
-}
{-# LANGUAGE DeriveDataTypeable #-}
......@@ -17,7 +17,7 @@ GHC.Hs.Types: Abstract syntax: user-defined types
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
module GHC.Hs.Types (
module GHC.Hs.Type (
HsType(..), NewHsTypeX(..), LHsType, HsKind, LHsKind,
HsTyVarBndr(..), LHsTyVarBndr, ForallVisFlag(..),
LHsQTyVars(..),
......
......@@ -110,7 +110,7 @@ import GHC.Hs.Decls
import GHC.Hs.Binds
import GHC.Hs.Expr
import GHC.Hs.Pat
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Hs.Lit
import GHC.Hs.Extension
......@@ -745,7 +745,7 @@ typeToLHsType ty
argf_to_spec :: ArgFlag -> Specificity
argf_to_spec Required = SpecifiedSpec
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Types
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Type
argf_to_spec (Invisible s) = s
go_tv :: TyVarBinder -> LHsTyVarBndr Specificity GhcPs
......
......@@ -41,7 +41,7 @@ import GHC.Core.SimpleOpt ( simpleOptExpr )
import GHC.Core.Opt.OccurAnal ( occurAnalyseExpr )
import GHC.Core.Make
import GHC.Core.Utils
import GHC.Core.Arity ( etaExpand )
import GHC.Core.Opt.Arity ( etaExpand )
import GHC.Core.Unfold
import GHC.Core.FVs
import GHC.Data.Graph.Directed
......
......@@ -14,7 +14,7 @@ import GHC.Hs.Binds
import GHC.Hs.Doc
import GHC.Hs.Decls
import GHC.Hs.Extension
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Hs.Utils
import GHC.Types.Name
import GHC.Types.Name.Set
......
......@@ -1282,7 +1282,7 @@ repTy ty@(HsForAllTy { hst_fvf = fvf, hst_bndrs = tvs, hst_body = body }) =
case fvf of
ForallInvis -> repForallT ty
ForallVis -> let tvs' = map ((<$>) (setHsTyVarBndrFlag ())) tvs
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Types
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Type
in addHsTyVarBinds tvs' $ \bndrs ->
do body1 <- repLTy body
repTForallVis bndrs body1
......
......@@ -29,7 +29,7 @@ import GHC.Core.Lint
import GHC.Core.Rules
import GHC.Core.PatSyn
import GHC.Core.ConLike
import GHC.Core.Arity ( exprArity, exprBotStrictness_maybe )
import GHC.Core.Opt.Arity ( exprArity, exprBotStrictness_maybe )
import GHC.Iface.Tidy.StaticPtrTable
import GHC.Types.Var.Env
import GHC.Types.Var.Set
......
......@@ -3467,7 +3467,7 @@ qconop :: { Located RdrName }
-- Type constructors
-- See Note [Unit tuples] in GHC.Hs.Types for the distinction
-- See Note [Unit tuples] in GHC.Hs.Type for the distinction
-- between gtycon and ntgtycon
gtycon :: { Located RdrName } -- A "general" qualified tycon, including unit tuples
: ntgtycon { $1 }
......
......@@ -974,7 +974,7 @@ checkTyClHdr is_cls ty
arity = length ts
tup_name | is_cls = cTupleTyConName arity
| otherwise = getName (tupleTyCon Boxed arity)
-- See Note [Unit tuples] in GHC.Hs.Types (TODO: is this still relevant?)
-- See Note [Unit tuples] in GHC.Hs.Type (TODO: is this still relevant?)
go l _ _ _ _
= addFatalError l (text "Malformed head of type or class declaration:"
<+> ppr ty)
......
......@@ -101,7 +101,7 @@ data HsSigWcTypeScoping
-- This only applies to RULES that do not explicitly bind their type
-- variables. If a RULE explicitly quantifies its type variables, then
-- 'NeverBind' is used instead. See also
-- @Note [Pattern signature binders and scoping]@ in "GHC.Hs.Types".
-- @Note [Pattern signature binders and scoping]@ in "GHC.Hs.Type".
| BindUnlessForall
-- ^ Unless there's forall at the top, do the same thing as 'AlwaysBind'.
-- This is only ever used in places where the \"@forall@-or-nothing\" rule
......@@ -118,7 +118,7 @@ data HsSigWcTypeScoping
-- but if the user had written @(y :: b)@ instead of @y@ in the term
-- variable binders, then @b@ would be rejected for being out of scope.
-- See also @Note [Pattern signature binders and scoping]@ in
-- "GHC.Hs.Types".
-- "GHC.Hs.Type".
rnHsSigWcType :: HsDocContext
-> Maybe SDoc
......@@ -143,7 +143,7 @@ rnHsPatSigType :: HsSigWcTypeScoping
-- ScopedTypeVariables isn't enabled
-- Wildcards are allowed
--
-- See Note [Pattern signature binders and scoping] in GHC.Hs.Types
-- See Note [Pattern signature binders and scoping] in GHC.Hs.Type
rnHsPatSigType scoping ctx inf_err sig_ty thing_inside
= do { ty_sig_okay <- xoptM LangExt.ScopedTypeVariables
; checkErr ty_sig_okay (unexpectedPatSigTypeErr sig_ty)
......@@ -314,7 +314,7 @@ partition_nwcs free_vars
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Identifiers starting with an underscore are always parsed as type variables.
It is only here in the renamer that we give the special treatment.
See Note [The wildcard story for types] in GHC.Hs.Types.
See Note [The wildcard story for types] in GHC.Hs.Type.
It's easy! When we collect the implicitly bound type variables, ready
to bring them into scope, and NamedWildCards is on, we partition the
......
......@@ -427,7 +427,7 @@ argument, which we do not want because users should be able to write
solution is to switch the PartialTypeSignatures flags here to let the
typechecker know that it's checking a '@_' and do not emit hole
constraints on it. See related Note [Wildcards in visible kind
application] and Note [The wildcard story for types] in GHC.Hs.Types
application] and Note [The wildcard story for types] in GHC.Hs.Type
Ugh!
......@@ -772,7 +772,7 @@ tc_hs_type mode rn_ty@(HsListTy _ elt_ty) exp_kind
; checkWiredInTyCon listTyCon
; checkExpectedKind rn_ty (mkListTy tau_ty) liftedTypeKind exp_kind }
-- See Note [Distinguishing tuple kinds] in GHC.Hs.Types
-- See Note [Distinguishing tuple kinds] in GHC.Hs.Type
-- See Note [Inferring tuple kinds]
tc_hs_type mode rn_ty@(HsTupleTy _ HsBoxedOrConstraintTuple hs_tys) exp_kind
-- (NB: not zonking before looking at exp_k, to avoid left-right bias)
......@@ -953,7 +953,7 @@ And whenever we see a '@', we automatically turn on PartialTypeSignatures and
turn off hole constraint warnings, and do not call emitAnonTypeHole
under these conditions.
See related Note [Wildcards in visible type application] here and
Note [The wildcard story for types] in GHC.Hs.Types
Note [The wildcard story for types] in GHC.Hs.Type
Note [Skolem escape and forall-types]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -1842,7 +1842,7 @@ tcNamedWildCardBinders :: [Name]
-> TcM a
-- Bring into scope the /named/ wildcard binders. Remember that
-- plain wildcards _ are anonymous and dealt with by HsWildCardTy
-- Soe Note [The wildcard story for types] in GHC.Hs.Types
-- Soe Note [The wildcard story for types] in GHC.Hs.Type
tcNamedWildCardBinders wc_names thing_inside
= do { wcs <- mapM (const newWildTyVar) wc_names
; let wc_prs = wc_names `zip` wcs
......@@ -3390,7 +3390,7 @@ tcHsPatSigType :: UserTypeCtxt
-- Used for type-checking type signatures in
-- (a) patterns e.g f (x::Int) = e
-- (b) RULE forall bndrs e.g. forall (x::Int). f x = x
-- See Note [Pattern signature binders and scoping] in GHC.Hs.Types
-- See Note [Pattern signature binders and scoping] in GHC.Hs.Type
--
-- This may emit constraints
-- See Note [Recipe for checking a signature]
......
......@@ -2128,7 +2128,7 @@ reify_for_all argf ty = do
case argToForallVisFlag argf of
ForallVis -> do phi' <- reifyType phi
let tvs = map (() <$) tvbndrs'
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Types
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Type
pure $ TH.ForallVisT tvs phi'
ForallInvis -> do let (cxt, tau) = tcSplitPhiTy phi
cxt' <- reifyCxt cxt
......
......@@ -38,7 +38,7 @@ import GHC.Utils.Outputable
import GHC.Driver.Session( DynFlags )
import GHC.Types.Name.Set
import GHC.Types.Name.Reader
import GHC.Hs.Types( HsIPName(..) )
import GHC.Hs.Type( HsIPName(..) )
import GHC.Data.Pair
import GHC.Utils.Misc
......
......@@ -554,7 +554,7 @@ tcInstTypeBndrs inst_tyvars id =
where
argf_to_spec :: VarBndr TyCoVar ArgFlag -> VarBndr TyCoVar Specificity
argf_to_spec (Bndr tv Required) = Bndr tv SpecifiedSpec
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Types
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Type
argf_to_spec (Bndr tv (Invisible s)) = Bndr tv s
tcSkolDFunType :: DFunId -> TcM ([TcTyVar], TcThetaType, TcType)
......
......@@ -5,7 +5,7 @@ import GHC.Tc.Utils.TcType ( TcTauType )
import GHC.Tc.Types ( TcM )
import GHC.Tc.Types.Evidence ( TcCoercion )
import GHC.Hs.Expr ( HsExpr )
import GHC.Hs.Types ( HsType )
import GHC.Hs.Type ( HsType )
import GHC.Hs.Extension ( GhcRn )
-- This boot file exists only to tie the knot between
......
......@@ -1482,7 +1482,7 @@ cvtTypeKind ty_str ty
ForallVisT tvs ty
| null tys'
-> do { let tvs_spec = map (TH.SpecifiedSpec <$) tvs
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Types
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Type
; tvs_spec' <- cvtTvs tvs_spec
; ty' <- cvtType ty
; loc <- getL
......
......@@ -152,7 +152,7 @@ instance Outputable LeftOrRight where
-- "real work". So:
-- fib 100 has arity 0
-- \x -> fib x has arity 1
-- See also Note [Definition of arity] in GHC.Core.Arity
-- See also Note [Definition of arity] in GHC.Core.Opt.Arity
type Arity = Int
-- | Representation Arity
......
......@@ -780,7 +780,7 @@ idOneShotInfo :: Id -> OneShotInfo
idOneShotInfo id = oneShotInfo (idInfo id)
-- | Like 'idOneShotInfo', but taking the Horrible State Hack in to account
-- See Note [The state-transformer hack] in GHC.Core.Arity
-- See Note [The state-transformer hack] in GHC.Core.Opt.Arity
idStateHackOneShotInfo :: Id -> OneShotInfo
idStateHackOneShotInfo id
| isStateHackType (idType id) = stateHackOneShot
......@@ -790,7 +790,7 @@ idStateHackOneShotInfo id
-- This one is the "business end", called externally.
-- It works on type variables as well as Ids, returning True
-- Its main purpose is to encapsulate the Horrible State Hack
-- See Note [The state-transformer hack] in GHC.Core.Arity
-- See Note [The state-transformer hack] in GHC.Core.Opt.Arity
isOneShotBndr :: Var -> Bool
isOneShotBndr var
| isTyVar var = True
......
......@@ -345,7 +345,7 @@ levityInfo = bitfieldGetLevityInfo . bitfield
oneShotInfo :: IdInfo -> OneShotInfo
oneShotInfo = bitfieldGetOneShotInfo . bitfield
-- | 'Id' arity, as computed by 'GHC.Core.Arity'. Specifies how many arguments
-- | 'Id' arity, as computed by 'GHC.Core.Opt.Arity'. Specifies how many arguments
-- this 'Id' has to be applied to before it doesn any meaningful work.
arityInfo :: IdInfo -> ArityInfo
arityInfo = bitfieldGetArityInfo . bitfield
......
......@@ -405,7 +405,7 @@ data ArgFlag = Invisible Specificity
-- (<) on ArgFlag means "is less visible than"
-- | Whether an 'Invisible' argument may appear in source Haskell.
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Types
-- see Note [Specificity in HsForAllTy] in GHC.Hs.Type
data Specificity = InferredSpec
-- ^ the argument may not appear in source Haskell, it is
-- only inferred.
......
......@@ -297,7 +297,7 @@ Library
GHC.StgToCmm.Utils
GHC.StgToCmm.ExtCode
GHC.Runtime.Heap.Layout
GHC.Core.Arity
GHC.Core.Opt.Arity
GHC.Core.FVs
GHC.Core.Lint
GHC.Core.Subst
......@@ -342,7 +342,7 @@ Library
GHC.Hs.Extension
GHC.Hs.Instances
GHC.Hs.Pat
GHC.Hs.Types
GHC.Hs.Type
GHC.Hs.Utils
GHC.Hs.Dump
GHC.Iface.Binary
......
hide_all = '-hide-all-packages -XNoImplicitPrelude '
incr_containers = '-package "containers (Data.Map as Map, Data.Set)" '
inc_containers = '-package containers '
incr_ghc = '-package "ghc (GHC.Hs.Types as GHC.Hs.MyTypes, GHC.Hs.Utils)" '
incr_ghc = '-package "ghc (GHC.Hs.Type as GHC.Hs.MyTypes, GHC.Hs.Utils)" '
inc_ghc = '-package ghc '
hide_ghc = '-hide-package ghc '
......
module Package05 where
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Hs.MyTypes
import GHC.Hs.Utils
module Package06e where
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Types.Unique.FM
package06e.hs:2:1: error:
Could not load module ‘GHC.Hs.Types
Could not load module ‘GHC.Hs.Type’
It is a member of the hidden package ‘ghc-8.7’.
You can run ‘:set -package ghc’ to expose it.
(Note: this unloads all the modules in the current scope.)
......
module Package07e where
import GHC.Hs.MyTypes
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Hs.Utils
import GHC.Types.Unique.FM
......@@ -2,12 +2,12 @@
package07e.hs:2:1: error:
Could not find module ‘GHC.Hs.MyTypes’
Perhaps you meant
GHC.Hs.Types (needs flag -package-id ghc-8.11.0.20200401)
GHC.Hs.Type (needs flag -package-id ghc-8.11.0.20200401)
GHC.Tc.Types (needs flag -package-id ghc-8.11.0.20200401)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
package07e.hs:3:1: error:
Could not load module ‘GHC.Hs.Types
Could not load module ‘GHC.Hs.Type’
It is a member of the hidden package ‘ghc-8.11.0.20200401’.
You can run ‘:set -package ghc’ to expose it.
(Note: this unloads all the modules in the current scope.)
......
module Package08e where
import GHC.Hs.MyTypes
import GHC.Hs.Types
import GHC.Hs.Type
import GHC.Hs.Utils
import GHC.Types.Unique.FM
......@@ -2,12 +2,12 @@
package08e.hs:2:1: error:
Could not find module ‘GHC.Hs.MyTypes’
Perhaps you meant
GHC.Hs.Types (needs flag -package-id ghc-8.11.0.20200401)
GHC.Hs.Type (needs flag -package-id ghc-8.11.0.20200401)
GHC.Tc.Types (needs flag -package-id ghc-8.11.0.20200401)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
package08e.hs:3:1: error:
Could not load module ‘GHC.Hs.Types
Could not load module ‘GHC.Hs.Type’
It is a member of the hidden package ‘ghc-8.11.0.20200401’.
You can run ‘:set -package ghc’ to expose it.
(Note: this unloads all the modules in the current scope.)
......
Subproject commit a8d7e66da4dcc3b242103271875261604be42d6e
Subproject commit 8f340aef12df5f5df02d49ab5c6c5d7cccfa398b