Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
255418da
Commit
255418da
authored
Mar 19, 2020
by
Sylvain Henry
Committed by
Marge Bot
Apr 07, 2020
Browse files
Modules: type-checker (#13009)
Update Haddock submodule
parent
3d2991f8
Pipeline
#17767
failed with stages
in 310 minutes and 37 seconds
Changes
240
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CODEOWNERS
View file @
255418da
...
...
@@ -16,26 +16,26 @@
/includes/ @bgamari @simonmar @osa1
# The compiler
/compiler/parser/ @int-index
/compiler/
hsSyn
/ @simonpj @rae
/compiler/
typecheck/
@simonpj @rae
/compiler/
r
ename/
@simonpj @rae
/compiler/
t
ypes/
@simonpj @rae
/compiler/
deSugar/
@simonpj @rae
/compiler/
typecheck
/TcDeriv
*
@RyanGlScott
/compiler/
nativeGen/
@simonmar @bgamari @AndreasK
/compiler/
llvmGen/
@angerman
/compiler/
codeGen/
@simonmar @osa1
/compiler/
cmm/
@simonmar @osa1
/compiler/ghci/ @simonmar
/compiler/
simpl
Core/CallArity.hs
@nomeata
/compiler/utils/UnVarGraph.hs @nomeata
/compiler/
simpl
Core/Exitify.hs
@nomeata
/compiler/
simplStg/StgCse.hs
@nomeata
/compiler/
simpl
Stg/
Stg
Lift
Lams.hs
@sgraf
/compiler/
cmm
/CmmSwitch.hs @nomeata
/compiler/
stranal
/DmdAnal.hs
@simonpj @sgraf
/compiler/
hsSyn/Convert.hs
@rae
/compiler/parser/
@int-index
/compiler/
GHC/Hs
/ @simonpj @rae
/compiler/
GHC/Tc/
@simonpj @rae
/compiler/
GHC/R
ename/ @simonpj @rae
/compiler/
GHC/T
ypes/ @simonpj @rae
/compiler/
GHC/HsToCore/
@simonpj @rae
/compiler/
GHC
/Tc
/
Deriv
/
@RyanGlScott
/compiler/
GHC/CmmToAsm/
@simonmar @bgamari @AndreasK
/compiler/
GHC/CmmToLlvm/
@angerman
/compiler/
GHC/StgToCmm/
@simonmar @osa1
/compiler/
GHC/Cmm/
@simonmar @osa1
/compiler/ghci/
@simonmar
/compiler/
GHC/
Core/
Op/
CallArity.hs @nomeata
/compiler/utils/UnVarGraph.hs
@nomeata
/compiler/
GHC/
Core/
Op/
Exitify.hs @nomeata
/compiler/
GHC/Stg/CSE.hs
@nomeata
/compiler/
GHC/
Stg/Lift
.hs
@sgraf
/compiler/
GHC
/Cmm
/
Switch.hs @nomeata
/compiler/
GHC/Core/Op
/DmdAnal.hs @simonpj @sgraf
/compiler/
GHC/ThToHs.hs
@rae
# Core libraries
/libraries/base/ @hvr
...
...
compiler/GHC.hs
View file @
255418da
...
...
@@ -308,16 +308,16 @@ import GHC.Driver.Make
import
GHC.Driver.Hooks
import
GHC.Driver.Pipeline
(
compileOne'
)
import
GHC.Driver.Monad
import
TcRn
Monad
(
finalSafeMode
,
fixSafeInstances
,
initIfaceTcRn
)
import
GHC.Iface.Load
(
loadSysInterface
)
import
TcRn
Types
import
GHC.Tc.Utils.
Monad
(
finalSafeMode
,
fixSafeInstances
,
initIfaceTcRn
)
import
GHC.Iface.Load
(
loadSysInterface
)
import
GHC.Tc.
Types
import
GHC.Core.Predicate
import
GHC.Driver.Packages
import
GHC.Types.Name.Set
import
GHC.Types.Name.Reader
import
GHC.Hs
import
GHC.Core.Type
hiding
(
typeKind
)
import
TcType
import
GHC.Tc.Utils.
TcType
import
GHC.Types.Id
import
TysPrim
(
alphaTyVars
)
import
GHC.Core.TyCon
...
...
@@ -357,9 +357,9 @@ import Lexer
import
ApiAnnotation
import
qualified
GHC.LanguageExtensions
as
LangExt
import
GHC.Types.Name.Env
import
TcRnDriver
import
Inst
import
FamInst
import
GHC.Tc.Module
import
GHC.Tc.Utils.Instantiate
import
GHC.Tc.Instance.Family
import
FileCleanup
import
Data.Foldable
...
...
@@ -1322,7 +1322,7 @@ getNameToInstancesIndex visible_mods mods_to_load = do
;
(
pkg_fie
,
home_fie
)
<-
tcGetFamInstEnvs
-- We use Data.Sequence.Seq because we are creating left associated
-- mappends.
-- cls_index and fam_index below are adapted from
TcRnDriver
.lookupInsts
-- cls_index and fam_index below are adapted from
GHC.Tc.Module
.lookupInsts
;
let
cls_index
=
Map
.
fromListWith
mappend
[
(
n
,
Seq
.
singleton
ispec
)
|
ispec
<-
instEnvElts
ie_local
++
instEnvElts
ie_global
...
...
compiler/GHC/Cmm/Expr.hs
View file @
255418da
...
...
@@ -368,7 +368,7 @@ instance Ord r => DefinerOfRegs r r where
instance
(
Ord
r
,
UserOfRegs
r
CmmReg
)
=>
UserOfRegs
r
CmmExpr
where
-- The (Ord r) in the context is necessary here
-- See Note [Recursive superclasses] in
TcInstDcls
-- See Note [Recursive superclasses] in
GHC.Tc.TyCl.Instance
foldRegsUsed
dflags
f
!
z
e
=
expr
z
e
where
expr
z
(
CmmLit
_
)
=
z
expr
z
(
CmmLoad
addr
_
)
=
foldRegsUsed
dflags
f
z
addr
...
...
compiler/GHC/Cmm/Node.hs
View file @
255418da
...
...
@@ -348,7 +348,7 @@ instance UserOfRegs GlobalReg (CmmNode e x) where
instance
(
Ord
r
,
UserOfRegs
r
CmmReg
)
=>
UserOfRegs
r
ForeignTarget
where
-- The (Ord r) in the context is necessary here
-- See Note [Recursive superclasses] in
TcInstDcls
-- See Note [Recursive superclasses] in
GHC.Tc.TyCl.Instance
foldRegsUsed
_
_
!
z
(
PrimTarget
_
)
=
z
foldRegsUsed
dflags
f
!
z
(
ForeignTarget
e
_
)
=
foldRegsUsed
dflags
f
z
e
...
...
compiler/GHC/Core.hs
View file @
255418da
...
...
@@ -537,7 +537,7 @@ substitutions until the next run of the simplifier.
case (df @Int) of (co :: a ~# b) -> blah
Which is very exotic, and I think never encountered; but see
Note [Equality superclasses in quantified constraints]
in
Tc
Canonical
in
GHC.Tc.Solver.
Canonical
Note [Core case invariants]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
compiler/GHC/Core/Arity.hs
View file @
255418da
...
...
@@ -191,7 +191,7 @@ Note [Newtype classes and eta expansion]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NB: this nasty special case is no longer required, because
for newtype classes we don't use the class-op rule mechanism
at all. See Note [Single-method classes] in
TcInstDcls
. SLPJ May 2013
at all. See Note [Single-method classes] in
GHC.Tc.TyCl.Instance
. SLPJ May 2013
-------- Old out of date comments, just for interest -----------
We have to be careful when eta-expanding through newtypes. In general
...
...
compiler/GHC/Core/Class.hs
View file @
255418da
...
...
@@ -222,7 +222,7 @@ we should make sure that the first and third args match the instance
header.
Having the same variables for class and tycon is also used in checkValidRoles
(in TcTyCl
sDecls
) when checking a class's roles.
(in
GHC.
Tc
.
TyCl) when checking a class's roles.
************************************************************************
...
...
compiler/GHC/Core/Coercion.hs
View file @
255418da
...
...
@@ -207,7 +207,7 @@ pprCoAxiom ax@(CoAxiom { co_ax_tc = tc, co_ax_branches = branches })
pprCoAxBranchUser
::
TyCon
->
CoAxBranch
->
SDoc
-- Used when printing injectivity errors (FamInst.reportInjectivityErrors)
-- and inaccessible branches (GHC.Tc.Validity.inaccessibleCoAxBranch)
-- This happens in error messages: don't print the RHS of a data
-- family axiom, which is meaningless to a user
pprCoAxBranchUser
tc
br
...
...
@@ -2524,7 +2524,7 @@ buildCoercion orig_ty1 orig_ty2 = go orig_ty1 orig_ty2
%* *
%************************************************************************
The function below morally belongs in
Tc
Flatten, but it is used also in
The function below morally belongs in
GHC.Tc.Solver.
Flatten, but it is used also in
FamInstEnv, and so lives here.
Note [simplifyArgsWorker]
...
...
@@ -2838,7 +2838,7 @@ simplifyArgsWorker orig_ki_binders orig_inner_ki orig_fvs
kind_co
=
liftCoSubst
Nominal
lc
final_kind
go
acc_xis
acc_cos
lc
(
binder
:
binders
)
inner_ki
(
role
:
roles
)
((
xi
,
co
)
:
args
)
=
-- By Note [Flattening] in
Tc
Flatten invariant (F2),
=
-- By Note [Flattening] in
GHC.Tc.Solver.
Flatten invariant (F2),
-- tcTypeKind(xi) = tcTypeKind(ty). But, it's possible that xi will be
-- used as an argument to a function whose kind is different, if
-- earlier arguments have been flattened to new types. We thus
...
...
@@ -2898,7 +2898,7 @@ simplifyArgsWorker orig_ki_binders orig_inner_ki orig_fvs
-- This debug information is commented out because leaving it in
-- causes a ~2% increase in allocations in T9872d.
-- That's independent of the analogous case in flatten_args_fast
-- in
Tc
Flatten:
-- in
GHC.Tc.Solver.
Flatten:
-- each of these causes a 2% increase on its own, so commenting them
-- both out gives a 4% decrease in T9872d.
{-
...
...
compiler/GHC/Core/Coercion/Axiom.hs
View file @
255418da
...
...
@@ -240,7 +240,7 @@ data CoAxBranch
,
cab_cvs
::
[
CoVar
]
-- Bound coercion variables
-- Always empty, for now.
-- See Note [Constraints in patterns]
-- in TcTyCl
sDecls
-- in
GHC.
Tc
.
TyCl
,
cab_roles
::
[
Role
]
-- See Note [CoAxBranch roles]
,
cab_lhs
::
[
Type
]
-- Type patterns to match against
,
cab_rhs
::
Type
-- Right-hand side of the equality
...
...
@@ -427,7 +427,7 @@ TyCon rep_tc:
- This eta reduction happens for data instances as well
as newtype instances. Here we want to eta-reduce the data family axiom.
- This eta-reduction is done in
TcInstDcls
.tcDataFamInstDecl.
- This eta-reduction is done in
GHC.Tc.TyCl.Instance
.tcDataFamInstDecl.
But for a /type/ family
- cab_lhs has the exact arity of the family tycon
...
...
compiler/GHC/Core/Coercion/Opt.hs
View file @
255418da
...
...
@@ -13,7 +13,7 @@ import GHC.Core.TyCo.Rep
import
GHC.Core.TyCo.Subst
import
GHC.Core.Coercion
import
GHC.Core.Type
as
Type
hiding
(
substTyVarBndr
,
substTy
)
import
TcType
(
exactTyCoVarsOfType
)
import
GHC.Tc.Utils.
TcType
(
exactTyCoVarsOfType
)
import
GHC.Core.TyCon
import
GHC.Core.Coercion.Axiom
import
GHC.Types.Var.Set
...
...
compiler/GHC/Core/FamInstEnv.hs
View file @
255418da
...
...
@@ -863,7 +863,7 @@ conditions hold:
of last equation and check whether it is overlapped by any of previous
equations. Since it is overlapped by the first equation we conclude
that pair of last two equations does not violate injectivity
annotation. (Check done in TcValidity.checkValidCoAxiom#gather_conflicts)
annotation. (Check done in
GHC.
Tc
.
Validity.checkValidCoAxiom#gather_conflicts)
A special case of B is when RHSs unify with an empty substitution ie. they
are identical.
...
...
@@ -898,7 +898,7 @@ conditions hold:
injective. "Injective position" means either an argument to a type
constructor or argument to a type family on injective position.
There are subtleties here. See Note [Coverage condition for injective type families]
in
FamInst
.
in
GHC.Tc.Instance.Family
.
Check (1) must be done for all family instances (transitively) imported. Other
checks (2-4) should be done just for locally written equations, as they are checks
...
...
@@ -1189,7 +1189,7 @@ findBranch branches target_tys
apartnessCheck
::
[
Type
]
-- ^ /flattened/ target arguments. Make sure
-- they're flattened! See Note [Flattening].
-- (NB: This "flat" is a different
-- "flat" than is used in
Tc
Flatten.)
-- "flat" than is used in
GHC.Tc.Solver.
Flatten.)
->
CoAxBranch
-- ^ the candidate equation we wish to use
-- Precondition: this matches the target
->
Bool
-- ^ True <=> equation can fire
...
...
@@ -1445,7 +1445,7 @@ normalise_type ty
go_app_tys
::
Type
-- function
->
[
Type
]
-- args
->
NormM
(
Coercion
,
Type
)
-- cf.
Tc
Flatten.flatten_app_ty_args
-- cf.
GHC.Tc.Solver.
Flatten.flatten_app_ty_args
go_app_tys
(
AppTy
ty1
ty2
)
tys
=
go_app_tys
ty1
(
ty2
:
tys
)
go_app_tys
fun_ty
arg_tys
=
do
{
(
fun_co
,
nfun
)
<-
go
fun_ty
...
...
@@ -1476,7 +1476,7 @@ normalise_args :: Kind -- of the function
-- and the res_co :: kind(f orig_args) ~ kind(f xis)
-- NB: The xis might *not* have the same kinds as the input types,
-- but the resulting application *will* be well-kinded
-- cf.
Tc
Flatten.flatten_args_slow
-- cf.
GHC.Tc.Solver.
Flatten.flatten_args_slow
normalise_args
fun_ki
roles
args
=
do
{
normed_args
<-
zipWithM
normalise1
roles
args
;
let
(
xis
,
cos
,
res_co
)
=
simplifyArgsWorker
ki_binders
inner_ki
fvs
roles
normed_args
...
...
compiler/GHC/Core/InstEnv.hs
View file @
255418da
...
...
@@ -4,7 +4,7 @@
\section[InstEnv]{Utilities for typechecking instance declarations}
The bits common to
TcInstDcls
and TcDeriv.
The bits common to
GHC.Tc.TyCl.Instance
and
GHC.
Tc
.
Deriv.
-}
{-# LANGUAGE CPP, DeriveDataTypeable #-}
...
...
@@ -33,7 +33,7 @@ module GHC.Core.InstEnv (
import
GhcPrelude
import
TcType
-- InstEnv is really part of the type checker,
import
GHC.Tc.Utils.
TcType
-- InstEnv is really part of the type checker,
-- and depends on TcType in many ways
import
GHC.Core
(
IsOrphan
(
..
),
isOrphan
,
chooseOrphanAnchor
)
import
GHC.Types.Module
...
...
@@ -453,7 +453,7 @@ classInstances (InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible =
Nothing
->
[]
-- | Checks for an exact match of ClsInst in the instance environment.
-- We use this when we do signature checking in
TcRnDriver
-- We use this when we do signature checking in
GHC.Tc.Module
memberInstEnv
::
InstEnv
->
ClsInst
->
Bool
memberInstEnv
inst_env
ins_item
@
(
ClsInst
{
is_cls_nm
=
cls_nm
}
)
=
maybe
False
(
\
(
ClsIE
items
)
->
any
(
identicalDFunType
ins_item
)
items
)
...
...
@@ -732,7 +732,7 @@ type ClsInstLookupResult
,
[
ClsInst
]
-- These don't match but do unify
,
[
InstMatch
]
)
-- Unsafe overlapped instances under Safe Haskell
-- (see Note [Safe Haskell Overlapping Instances] in
--
TcSimplify
).
--
GHC.Tc.Solver
).
{-
Note [DFunInstType: instantiating types]
...
...
@@ -835,8 +835,8 @@ lookupInstEnv :: Bool -- Check Safe Haskell overlap restrictions
->
Class
->
[
Type
]
-- What we are looking for
->
ClsInstLookupResult
-- ^ See Note [Rules for instance lookup]
-- ^ See Note [Safe Haskell Overlapping Instances] in
TcSimplify
-- ^ See Note [Safe Haskell Overlapping Instances Implementation] in
TcSimplify
-- ^ See Note [Safe Haskell Overlapping Instances] in
GHC.Tc.Solver
-- ^ See Note [Safe Haskell Overlapping Instances Implementation] in
GHC.Tc.Solver
lookupInstEnv
check_overlap_safe
(
InstEnvs
{
ie_global
=
pkg_ie
,
ie_local
=
home_ie
...
...
compiler/GHC/Core/Lint.hs
View file @
255418da
...
...
@@ -35,7 +35,7 @@ import GHC.Types.Literal
import
GHC.Core.DataCon
import
TysWiredIn
import
TysPrim
import
TcType
(
isFloatingTy
)
import
GHC.Tc.Utils.
TcType
(
isFloatingTy
)
import
GHC.Types.Var
as
Var
import
GHC.Types.Var.Env
import
GHC.Types.Var.Set
...
...
@@ -440,7 +440,7 @@ interactiveInScope :: HscEnv -> [Var]
interactiveInScope
hsc_env
=
tyvars
++
ids
where
-- C.f.
TcRnDriver
.setInteractiveContext, Desugar.deSugarExpr
-- C.f.
GHC.Tc.Module
.setInteractiveContext, Desugar.deSugarExpr
ictxt
=
hsc_IC
hsc_env
(
cls_insts
,
_fam_insts
)
=
ic_instances
ictxt
te1
=
mkTypeEnvWithImplicits
(
ic_tythings
ictxt
)
...
...
@@ -1491,7 +1491,7 @@ Here 'cls' appears free in b's kind, which would usually be illegal
#in this case (Alg cls *) = *, so all is well. Currently we allow
this, and make Lint expand synonyms where necessary to make it so.
c.f.
Tc
Unify.occCheckExpand and GHC.Core.Utils.coreAltsType which deal
c.f.
GHC.Tc.Utils.
Unify.occCheckExpand and GHC.Core.Utils.coreAltsType which deal
with the same problem. A single systematic solution eludes me.
-}
...
...
@@ -1499,7 +1499,7 @@ with the same problem. A single systematic solution eludes me.
lintTySynFamApp
::
Bool
->
Type
->
TyCon
->
[
Type
]
->
LintM
LintedKind
-- The TyCon is a type synonym or a type family (not a data family)
-- See Note [Linting type synonym applications]
-- c.f. TcValidity.check_syn_tc_app
-- c.f.
GHC.
Tc
.
Validity.check_syn_tc_app
lintTySynFamApp
report_unsat
ty
tc
tys
|
report_unsat
-- Report unsaturated only if report_unsat is on
,
tys
`
lengthLessThan
`
tyConArity
tc
...
...
compiler/GHC/Core/Op/CSE.hs
View file @
255418da
...
...
@@ -534,7 +534,7 @@ version:
We had to revert this patch because it made GHC itself slower.
Why? It delayed inlining of /all/ functions with RULES, and that was
very bad in
Tc
Flatten.flatten_ty_con_app
very bad in
GHC.Tc.Solver.
Flatten.flatten_ty_con_app
* It delayed inlining of liftM
* That delayed the unravelling of the recursion in some dictionary
...
...
compiler/GHC/Core/Op/OccurAnal.hs
View file @
255418da
...
...
@@ -1100,7 +1100,7 @@ inline 'f' in '$wf'.
Note [DFuns should not be loop breakers]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's particularly bad to make a DFun into a loop breaker. See
Note [How instance declarations are translated] in
TcInstDcls
Note [How instance declarations are translated] in
GHC.Tc.TyCl.Instance
We give DFuns a higher score than ordinary CONLIKE things because
if there's a choice we want the DFun to be the non-loop breaker. Eg
...
...
@@ -2914,7 +2914,7 @@ from making it a join point.
If it is recursive, and uselessly marked INLINE, this will stop us
making it a join point, which is annoying. But occasionally
(notably in class methods; see Note [Instances and loop breakers] in
TcInstDcls
) we mark recursive things as INLINE but the recursion
GHC.Tc.TyCl.Instance
) we mark recursive things as INLINE but the recursion
unravels; so ignoring INLINE pragmas on recursive things isn't good
either.
...
...
compiler/GHC/Core/Op/Simplify.hs
View file @
255418da
...
...
@@ -3554,7 +3554,7 @@ simplStableUnfolding env top_lvl mb_cont id unf rhs_ty
-- Refresh the boring-ok flag, in case expr'
-- has got small. This happens, notably in the inlinings
-- for dfuns for single-method classes; see
-- Note [Single-method classes] in
TcInstDcls
.
-- Note [Single-method classes] in
GHC.Tc.TyCl.Instance
.
-- A test case is #4138
-- But retain a previous boring_ok of True; e.g. see
-- the way it is set in calcUnfoldingGuidanceWithArity
...
...
compiler/GHC/Core/Op/Specialise.hs
View file @
255418da
...
...
@@ -16,7 +16,7 @@ module GHC.Core.Op.Specialise ( specProgram, specUnfolding ) where
import
GhcPrelude
import
GHC.Types.Id
import
TcType
hiding
(
substTy
)
import
GHC.Tc.Utils.
TcType
hiding
(
substTy
)
import
GHC.Core.Type
hiding
(
substTy
,
extendTvSubstList
)
import
GHC.Core.Predicate
import
GHC.Types.Module
(
Module
,
HasModule
(
..
)
)
...
...
compiler/GHC/Core/PatSyn.hs
View file @
255418da
...
...
@@ -295,12 +295,12 @@ would be a top-level declaration with an unboxed type.
This means that when typechecking an occurrence of P in an expression,
we must remember that the builder has this void argument. This is
done by
Tc
PatSyn.patSynBuilderOcc.
done by
GHC.Tc.TyCl.
PatSyn.patSynBuilderOcc.
Note [Pattern synonyms and the data type Type]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The type of a pattern synonym is of the form (See Note
[Pattern synonym signatures] in
Tc
Sig
s
):
[Pattern synonym signatures] in
GHC.Tc.Gen.
Sig):
forall univ_tvs. req => forall ex_tvs. prov => ...
...
...
compiler/GHC/Core/Predicate.hs
View file @
255418da
...
...
@@ -51,7 +51,7 @@ data Pred
|
EqPred
EqRel
Type
Type
|
IrredPred
PredType
|
ForAllPred
[
TyVar
]
[
PredType
]
PredType
-- ForAllPred: see Note [Quantified constraints] in
Tc
Canonical
-- ForAllPred: see Note [Quantified constraints] in
GHC.Tc.Solver.
Canonical
-- NB: There is no TuplePred case
-- Tuple predicates like (Eq a, Ord b) are just treated
-- as ClassPred, as if we had a tuple class with two superclasses
...
...
@@ -144,7 +144,7 @@ Predicates on PredType
{-
Note [Evidence for quantified constraints]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The superclass mechanism in
Tc
Canonical.makeSuperClasses risks
The superclass mechanism in
GHC.Tc.Solver.
Canonical.makeSuperClasses risks
taking a quantified constraint like
(forall a. C a => a ~ b)
and generate superclass evidence
...
...
@@ -153,7 +153,7 @@ and generate superclass evidence
This is a funny thing: neither isPredTy nor isCoVarType are true
of it. So we are careful not to generate it in the first place:
see Note [Equality superclasses in quantified constraints]
in
Tc
Canonical.
in
GHC.Tc.Solver.
Canonical.
-}
isEvVarType
::
Type
->
Bool
...
...
compiler/GHC/Core/Rules.hs
View file @
255418da
...
...
@@ -34,19 +34,19 @@ import GHC.Core -- All of it
import
GHC.Types.Module
(
Module
,
ModuleSet
,
elemModuleSet
)
import
GHC.Core.Subst
import
GHC.Core.SimpleOpt
(
exprIsLambda_maybe
)
import
GHC.Core.FVs
(
exprFreeVars
,
exprsFreeVars
,
bindFreeVars
,
rulesFreeVarsDSet
,
exprsOrphNames
,
exprFreeVarsList
)
import
GHC.Core.Utils
(
exprType
,
eqExpr
,
mkTick
,
mkTicks
,
stripTicksTopT
,
stripTicksTopE
,
isJoinBind
)
import
GHC.Core.Ppr
(
pprRules
)
import
GHC.Core.FVs
(
exprFreeVars
,
exprsFreeVars
,
bindFreeVars
,
rulesFreeVarsDSet
,
exprsOrphNames
,
exprFreeVarsList
)
import
GHC.Core.Utils
(
exprType
,
eqExpr
,
mkTick
,
mkTicks
,
stripTicksTopT
,
stripTicksTopE
,
isJoinBind
)
import
GHC.Core.Ppr
(
pprRules
)
import
GHC.Core.Type
as
Type
(
Type
,
TCvSubst
,
extendTvSubst
,
extendCvSubst
,
mkEmptyTCvSubst
,
substTy
)
import
TcType
(
tcSplitTyConApp_maybe
)
import
TysWiredIn
(
anyTypeOfKind
)
import
GHC.Tc.Utils.TcType
(
tcSplitTyConApp_maybe
)
import
TysWiredIn
(
anyTypeOfKind
)
import
GHC.Core.Coercion
as
Coercion
import
GHC.Core.Op.Tidy
(
tidyRules
)
import
GHC.Core.Op.Tidy
(
tidyRules
)
import
GHC.Types.Id
import
GHC.Types.Id.Info
(
RuleInfo
(
RuleInfo
)
)
import
GHC.Types.Var
...
...
@@ -972,7 +972,7 @@ match_ty :: RuleMatchEnv
->
Type
-- Template
->
Type
-- Target
->
Maybe
RuleSubst
-- Matching Core types: use the matcher in TcType.
-- Matching Core types: use the matcher in
GHC.Tc.Utils.
TcType.
-- Notice that we treat newtypes as opaque. For example, suppose
-- we have a specialised version of a function at a newtype, say
-- newtype T = MkT Int
...
...
Prev
1
2
3
4
5
…
12
Next
Marge Bot
💬
@marge-bot
mentioned in merge request
!2924 (closed)
·
Apr 07, 2020
mentioned in merge request
!2924 (closed)
mentioned in merge request !2924
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment