Commit f265008f authored by Simon Peyton Jones's avatar Simon Peyton Jones

Refactor (~) to reduce the suerpclass stack

The constraint (~) used to be (effectively):
  class a ~~ b => (a :: k) ~ (b :: k)

but, with this patch, it is now defined uniformly with
(~~) and Coercible like this:
  class a ~# b => (a :: k) ~ (b :: k)

Result:
  * One less superclass selection when goinng from (~) to (~#)
    Better for compile time and better for debugging with -ddump-simpl

  * The code for (~), (~~), and Coercible looks uniform, and appears
    together, e.g. in TysWiredIn and ClsInst.matchGlobalInst.
    Previously the code for (~) was different, and unique.

Not only is this simpler, but it also makes the compiler a bit faster;
  T12227: 9% less allocation
  T12545: 7% less allocation

This patch fixes Trac #15421
parent 4c571f33
......@@ -174,8 +174,7 @@ import CoAxiom
import ConLike
import DataCon
import PatSyn
import PrelNames ( gHC_PRIM, ioTyConName, printName, mkInteractiveModule
, eqTyConName )
import PrelNames ( gHC_PRIM, ioTyConName, printName, mkInteractiveModule )
import TysWiredIn
import Packages hiding ( Version(..) )
import CmdLineParser
......
......@@ -76,10 +76,9 @@ import TcEvidence ( emptyTcEvBinds )
-- compiler/prelude
import ForeignCall
import TysPrim ( eqPrimTyCon )
import PrelNames ( eqTyCon_RDR )
import TysWiredIn ( unitTyCon, unitDataCon, tupleTyCon, tupleDataCon, nilDataCon,
unboxedUnitTyCon, unboxedUnitDataCon,
listTyCon_RDR, consDataCon_RDR )
listTyCon_RDR, consDataCon_RDR, eqTyCon_RDR )
-- compiler/utils
import Util ( looksLikePackageName )
......
......@@ -92,9 +92,9 @@ import Lexeme ( isLexCon )
import Type ( TyThing(..) )
import TysWiredIn ( cTupleTyConName, tupleTyCon, tupleDataCon,
nilDataConName, nilDataConKey,
listTyConName, listTyConKey )
listTyConName, listTyConKey, eqTyCon_RDR )
import ForeignCall
import PrelNames ( forall_tv_RDR, eqTyCon_RDR, allNameStrings )
import PrelNames ( forall_tv_RDR, allNameStrings )
import SrcLoc
import Unique ( hasKey )
import OrdList ( OrdList, fromOL )
......
......@@ -393,7 +393,7 @@ basicKnownKeyNames
-- The Ordering type
, orderingTyConName
, ltDataConName, eqDataConName, gtDataConName
, ordLTDataConName, ordEQDataConName, ordGTDataConName
-- The SPEC type for SpecConstr
, specTyConName
......@@ -433,9 +433,6 @@ basicKnownKeyNames
, typeErrorVAppendDataConName
, typeErrorShowTypeDataConName
-- homogeneous equality
, eqTyConName
] ++ case cIntegerLibraryType of
IntegerGMP -> [integerSDataConName,naturalSDataConName]
IntegerSimple -> []
......@@ -859,9 +856,6 @@ traverse_RDR = varQual_RDR dATA_TRAVERSABLE (fsLit "traverse")
mempty_RDR = varQual_RDR gHC_BASE (fsLit "mempty")
mappend_RDR = varQual_RDR gHC_BASE (fsLit "mappend")
eqTyCon_RDR :: RdrName
eqTyCon_RDR = tcQual_RDR dATA_TYPE_EQUALITY (fsLit "~")
----------------------
varQual_RDR, tcQual_RDR, clsQual_RDR, dataQual_RDR
:: Module -> FastString -> RdrName
......@@ -889,11 +883,11 @@ runMainIOName, runRWName :: Name
runMainIOName = varQual gHC_TOP_HANDLER (fsLit "runMainIO") runMainKey
runRWName = varQual gHC_MAGIC (fsLit "runRW#") runRWKey
orderingTyConName, ltDataConName, eqDataConName, gtDataConName :: Name
orderingTyConName, ordLTDataConName, ordEQDataConName, ordGTDataConName :: Name
orderingTyConName = tcQual gHC_TYPES (fsLit "Ordering") orderingTyConKey
ltDataConName = dcQual gHC_TYPES (fsLit "LT") ltDataConKey
eqDataConName = dcQual gHC_TYPES (fsLit "EQ") eqDataConKey
gtDataConName = dcQual gHC_TYPES (fsLit "GT") gtDataConKey
ordLTDataConName = dcQual gHC_TYPES (fsLit "LT") ordLTDataConKey
ordEQDataConName = dcQual gHC_TYPES (fsLit "EQ") ordEQDataConKey
ordGTDataConName = dcQual gHC_TYPES (fsLit "GT") ordGTDataConKey
specTyConName :: Name
specTyConName = tcQual gHC_TYPES (fsLit "SPEC") specTyConKey
......@@ -1531,10 +1525,6 @@ fingerprintDataConName :: Name
fingerprintDataConName =
dcQual gHC_FINGERPRINT_TYPE (fsLit "Fingerprint") fingerprintDataConKey
-- homogeneous equality. See Note [The equality types story] in TysPrim
eqTyConName :: Name
eqTyConName = tcQual dATA_TYPE_EQUALITY (fsLit "~") eqTyConKey
{-
************************************************************************
* *
......@@ -1916,7 +1906,7 @@ charDataConKey, consDataConKey, doubleDataConKey, falseDataConKey,
floatDataConKey, intDataConKey, integerSDataConKey, nilDataConKey,
ratioDataConKey, stableNameDataConKey, trueDataConKey, wordDataConKey,
word8DataConKey, ioDataConKey, integerDataConKey, heqDataConKey,
coercibleDataConKey, nothingDataConKey, justDataConKey :: Unique
coercibleDataConKey, eqDataConKey, nothingDataConKey, justDataConKey :: Unique
charDataConKey = mkPreludeDataConUnique 1
consDataConKey = mkPreludeDataConUnique 2
......@@ -1927,6 +1917,7 @@ intDataConKey = mkPreludeDataConUnique 6
integerSDataConKey = mkPreludeDataConUnique 7
nothingDataConKey = mkPreludeDataConUnique 8
justDataConKey = mkPreludeDataConUnique 9
eqDataConKey = mkPreludeDataConUnique 10
nilDataConKey = mkPreludeDataConUnique 11
ratioDataConKey = mkPreludeDataConUnique 12
word8DataConKey = mkPreludeDataConUnique 13
......@@ -1948,10 +1939,11 @@ leftDataConKey, rightDataConKey :: Unique
leftDataConKey = mkPreludeDataConUnique 25
rightDataConKey = mkPreludeDataConUnique 26
ltDataConKey, eqDataConKey, gtDataConKey :: Unique
ltDataConKey = mkPreludeDataConUnique 27
eqDataConKey = mkPreludeDataConUnique 28
gtDataConKey = mkPreludeDataConUnique 29
ordLTDataConKey, ordEQDataConKey, ordGTDataConKey :: Unique
ordLTDataConKey = mkPreludeDataConUnique 27
ordEQDataConKey = mkPreludeDataConUnique 28
ordGTDataConKey = mkPreludeDataConUnique 29
coercibleDataConKey = mkPreludeDataConUnique 32
......@@ -2376,12 +2368,14 @@ starArrStarArrStarKindRepKey = mkPreludeMiscIdUnique 522
-- Dynamic
toDynIdKey :: Unique
toDynIdKey = mkPreludeMiscIdUnique 550
toDynIdKey = mkPreludeMiscIdUnique 523
bitIntegerIdKey :: Unique
bitIntegerIdKey = mkPreludeMiscIdUnique 551
bitIntegerIdKey = mkPreludeMiscIdUnique 550
heqSCSelIdKey, coercibleSCSelIdKey :: Unique
heqSCSelIdKey, eqSCSelIdKey, coercibleSCSelIdKey :: Unique
eqSCSelIdKey = mkPreludeMiscIdUnique 551
heqSCSelIdKey = mkPreludeMiscIdUnique 552
coercibleSCSelIdKey = mkPreludeMiscIdUnique 553
......
......@@ -934,9 +934,9 @@ trueValBool = Var trueDataConId -- see Note [What's true and false]
falseValBool = Var falseDataConId
ltVal, eqVal, gtVal :: Expr CoreBndr
ltVal = Var ltDataConId
eqVal = Var eqDataConId
gtVal = Var gtDataConId
ltVal = Var ordLTDataConId
eqVal = Var ordEQDataConId
gtVal = Var ordGTDataConId
mkIntVal :: DynFlags -> Integer -> Expr CoreBndr
mkIntVal dflags i = Lit (mkMachInt dflags i)
......
......@@ -599,7 +599,7 @@ GHC sports a veritable menagerie of equality types:
-----------------------------------------------------------------------------------------
~# T U hetero nominal eqPrimTyCon GHC.Prim
~~ C L hetero nominal hEqTyCon GHC.Types
~ C L homo nominal eqTyCon Data.Type.Equality
~ C L homo nominal eqTyCon GHC.Types
:~: T L homo nominal (not built-in) Data.Type.Equality
:~~: T L hetero nominal (not built-in) Data.Type.Equality
......@@ -642,6 +642,7 @@ This is (almost) an ordinary class, defined as if by
class a ~# b => a ~~ b
instance a ~# b => a ~~ b
Here's what's unusual about it:
* We can't actually declare it that way because we don't have syntax for ~#.
And ~# isn't a constraint, so even if we could write it, it wouldn't kind
check.
......@@ -671,21 +672,23 @@ Within GHC, ~~ is called heqTyCon, and it is defined in TysWiredIn.
--------------------------
(~) :: forall k. k -> k -> Constraint
--------------------------
This is defined in Data.Type.Equality:
class a ~~ b => (a :: k) ~ (b :: k)
instance a ~~ b => a ~ b
This is even more so an ordinary class than (~~), with the following exceptions:
* Users cannot write instances of it.
This is /exactly/ like (~~), except with a homogeneous kind.
It is an almost-ordinary class defined as if by
class a ~# b => (a :: k) ~ (b :: k)
instance a ~# b => a ~ b
* It is "naturally coherent". (See (~~).)
* All the bullets for (~~) apply
* (~) is magical syntax, as ~ is a reserved symbol.
* In addition (~) is magical syntax, as ~ is a reserved symbol.
It cannot be exported or imported.
* It always terminates.
Within GHC, ~ is called eqTyCon, and it is defined in TysWiredIn.
Within GHC, ~ is called eqTyCon, and it is defined in PrelNames. Note that
it is *not* wired in.
Historical note: prior to July 18 (~) was defined as a
more-ordinary class with (~~) as a superclass. But that made it
special in different ways; and the extra superclass selections to
get from (~) to (~#) via (~~) were tiresome. Now it's defined
uniformly with (~~) and Coercible; much nicer.)
--------------------------
......
......@@ -29,9 +29,9 @@ module TysWiredIn (
-- * Ordering
orderingTyCon,
ltDataCon, ltDataConId,
eqDataCon, eqDataConId,
gtDataCon, gtDataConId,
ordLTDataCon, ordLTDataConId,
ordEQDataCon, ordEQDataConId,
ordGTDataCon, ordGTDataConId,
promotedLTDataCon, promotedEQDataCon, promotedGTDataCon,
-- * Boxing primitive types
......@@ -96,6 +96,7 @@ module TysWiredIn (
-- * Equality predicates
heqTyCon, heqTyConName, heqClass, heqDataCon,
eqTyCon, eqTyConName, eqClass, eqDataCon, eqTyCon_RDR,
coercibleTyCon, coercibleTyConName, coercibleDataCon, coercibleClass,
-- * RuntimeRep and friends
......@@ -215,6 +216,7 @@ wiredInTyCons = [ -- Units are not treated like other tuples, because then
, listTyCon
, maybeTyCon
, heqTyCon
, eqTyCon
, coercibleTyCon
, typeNatKindCon
, typeSymbolKindCon
......@@ -241,11 +243,21 @@ mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name
mkWiredInIdName mod fs uniq id
= mkWiredInName mod (mkOccNameFS Name.varName fs) uniq (AnId id) UserSyntax
-- See Note [Kind-changing of (~) and Coercible]
-- in libraries/ghc-prim/GHC/Types.hs
eqTyConName, eqDataConName, eqSCSelIdName :: Name
eqTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "~") eqTyConKey eqTyCon
eqDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "Eq#") eqDataConKey eqDataCon
eqSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "eq_sel") eqSCSelIdKey eqSCSelId
eqTyCon_RDR :: RdrName
eqTyCon_RDR = nameRdrName eqTyConName
-- See Note [Kind-changing of (~) and Coercible]
-- in libraries/ghc-prim/GHC/Types.hs
heqTyConName, heqDataConName, heqSCSelIdName :: Name
heqTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "~~") heqTyConKey heqTyCon
heqDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "Eq#") heqDataConKey heqDataCon
heqDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "HEq#") heqDataConKey heqDataCon
heqSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "heq_sel") heqSCSelIdKey heqSCSelId
-- See Note [Kind-changing of (~) and Coercible] in libraries/ghc-prim/GHC/Types.hs
......@@ -1000,10 +1012,28 @@ mk_sum arity = (tycon, sum_cons)
-- necessary because the functional-dependency coverage check looks
-- through superclasses, and (~#) is handled in that check.
heqTyCon, coercibleTyCon :: TyCon
heqClass, coercibleClass :: Class
heqDataCon, coercibleDataCon :: DataCon
heqSCSelId, coercibleSCSelId :: Id
eqTyCon, heqTyCon, coercibleTyCon :: TyCon
eqClass, heqClass, coercibleClass :: Class
eqDataCon, heqDataCon, coercibleDataCon :: DataCon
eqSCSelId, heqSCSelId, coercibleSCSelId :: Id
(eqTyCon, eqClass, eqDataCon, eqSCSelId)
= (tycon, klass, datacon, sc_sel_id)
where
tycon = mkClassTyCon eqTyConName binders roles
rhs klass
(mkPrelTyConRepName eqTyConName)
klass = mk_class tycon sc_pred sc_sel_id
datacon = pcDataCon eqDataConName tvs [sc_pred] tycon
-- Kind: forall k. k -> k -> Constraint
binders = mkTemplateTyConBinders [liftedTypeKind] (\[k] -> [k,k])
roles = [Nominal, Nominal, Nominal]
rhs = mkDataTyConRhs [datacon]
tvs@[k,a,b] = binderVars binders
sc_pred = mkTyConApp eqPrimTyCon (mkTyVarTys [k,k,a,b])
sc_sel_id = mkDictSelId eqSCSelIdName klass
(heqTyCon, heqClass, heqDataCon, heqSCSelId)
= (tycon, klass, datacon, sc_sel_id)
......@@ -1046,6 +1076,8 @@ mk_class tycon sc_pred sc_sel_id
= mkClass (tyConName tycon) (tyConTyVars tycon) [] [sc_pred] [sc_sel_id]
[] [] (mkAnd []) tycon
{- *********************************************************************
* *
Kinds and RuntimeRep
......@@ -1354,17 +1386,17 @@ trueDataConId = dataConWorkId trueDataCon
orderingTyCon :: TyCon
orderingTyCon = pcTyCon orderingTyConName Nothing
[] [ltDataCon, eqDataCon, gtDataCon]
[] [ordLTDataCon, ordEQDataCon, ordGTDataCon]
ltDataCon, eqDataCon, gtDataCon :: DataCon
ltDataCon = pcDataCon ltDataConName [] [] orderingTyCon
eqDataCon = pcDataCon eqDataConName [] [] orderingTyCon
gtDataCon = pcDataCon gtDataConName [] [] orderingTyCon
ordLTDataCon, ordEQDataCon, ordGTDataCon :: DataCon
ordLTDataCon = pcDataCon ordLTDataConName [] [] orderingTyCon
ordEQDataCon = pcDataCon ordEQDataConName [] [] orderingTyCon
ordGTDataCon = pcDataCon ordGTDataConName [] [] orderingTyCon
ltDataConId, eqDataConId, gtDataConId :: Id
ltDataConId = dataConWorkId ltDataCon
eqDataConId = dataConWorkId eqDataCon
gtDataConId = dataConWorkId gtDataCon
ordLTDataConId, ordEQDataConId, ordGTDataConId :: Id
ordLTDataConId = dataConWorkId ordLTDataCon
ordEQDataConId = dataConWorkId ordEQDataCon
ordGTDataConId = dataConWorkId ordGTDataCon
{-
************************************************************************
......@@ -1505,9 +1537,9 @@ promotedLTDataCon
, promotedEQDataCon
, promotedGTDataCon
:: TyCon
promotedLTDataCon = promoteDataCon ltDataCon
promotedEQDataCon = promoteDataCon eqDataCon
promotedGTDataCon = promoteDataCon gtDataCon
promotedLTDataCon = promoteDataCon ordLTDataCon
promotedEQDataCon = promoteDataCon ordEQDataCon
promotedGTDataCon = promoteDataCon ordGTDataCon
-- Promoted List
promotedConsDataCon, promotedNilDataCon :: TyCon
......
......@@ -94,8 +94,9 @@ matchGlobalInst dflags short_cut clas tys
| cls_name == knownSymbolClassName = matchKnownSymbol clas tys
| isCTupleClass clas = matchCTuple clas tys
| cls_name == typeableClassName = matchTypeable clas tys
| clas `hasKey` heqTyConKey = matchLiftedEquality tys
| clas `hasKey` coercibleTyConKey = matchLiftedCoercible tys
| clas `hasKey` heqTyConKey = matchHeteroEquality tys
| clas `hasKey` eqTyConKey = matchHomoEquality tys
| clas `hasKey` coercibleTyConKey = matchCoercible tys
| cls_name == hasFieldClassName = matchHasField dflags short_cut clas tys
| otherwise = matchInstEnv dflags short_cut clas tys
where
......@@ -449,22 +450,31 @@ if you'd written
***********************************************************************-}
-- See also Note [The equality types story] in TysPrim
matchLiftedEquality :: [Type] -> TcM ClsInstResult
matchLiftedEquality args
matchHeteroEquality :: [Type] -> TcM ClsInstResult
-- Solves (t1 ~~ t2)
matchHeteroEquality args
= return (OneInst { cir_new_theta = [ mkTyConApp eqPrimTyCon args ]
, cir_mk_ev = evDFunApp (dataConWrapId heqDataCon) args
, cir_what = BuiltinInstance })
matchHomoEquality :: [Type] -> TcM ClsInstResult
-- Solves (t1 ~ t2)
matchHomoEquality args@[k,t1,t2]
= return (OneInst { cir_new_theta = [ mkTyConApp eqPrimTyCon [k,k,t1,t2] ]
, cir_mk_ev = evDFunApp (dataConWrapId eqDataCon) args
, cir_what = BuiltinInstance })
matchHomoEquality args = pprPanic "matchHomoEquality" (ppr args)
-- See also Note [The equality types story] in TysPrim
matchLiftedCoercible :: [Type] -> TcM ClsInstResult
matchLiftedCoercible args@[k, t1, t2]
matchCoercible :: [Type] -> TcM ClsInstResult
matchCoercible args@[k, t1, t2]
= return (OneInst { cir_new_theta = [ mkTyConApp eqReprPrimTyCon args' ]
, cir_mk_ev = evDFunApp (dataConWrapId coercibleDataCon)
args
, cir_what = BuiltinInstance })
where
args' = [k, k, t1, t2]
matchLiftedCoercible args = pprPanic "matchLiftedCoercible" (ppr args)
matchCoercible args = pprPanic "matchLiftedCoercible" (ppr args)
{- ********************************************************************
......
......@@ -45,7 +45,7 @@ import TcRnMonad
import TcEnv
import TcEvidence
import InstEnv
import TysWiredIn ( heqDataCon )
import TysWiredIn ( heqDataCon, eqDataCon )
import CoreSyn ( isOrphan )
import FunDeps
import TcMType
......@@ -60,7 +60,6 @@ import Id
import Name
import Var ( EvVar, mkTyVar, tyVarName, TyVarBndr(..) )
import DataCon
import TyCon
import VarEnv
import PrelNames
import SrcLoc
......@@ -577,10 +576,8 @@ mkHEqBoxTy co ty1 ty2
-- | This takes @a ~# b@ and returns @a ~ b@.
mkEqBoxTy :: TcCoercion -> Type -> Type -> TcM Type
mkEqBoxTy co ty1 ty2
= do { eq_tc <- tcLookupTyCon eqTyConName
; let [datacon] = tyConDataCons eq_tc
; hetero <- mkHEqBoxTy co ty1 ty2
; return $ mkTyConApp (promoteDataCon datacon) [k, ty1, ty2, hetero] }
= return $
mkTyConApp (promoteDataCon eqDataCon) [k, ty1, ty2, mkCoercionTy co]
where k = typeKind ty1
{-
......
......@@ -30,7 +30,7 @@ import TcSimplify ( simplifyAmbiguityCheck )
import ClsInst ( matchGlobalInst, ClsInstResult(..), InstanceWhat(..) )
import TyCoRep
import TcType hiding ( sizeType, sizeTypes )
import TysWiredIn ( heqTyConName, coercibleTyConName )
import TysWiredIn ( heqTyConName, eqTyConName, coercibleTyConName )
import PrelNames
import Type
import Coercion
......
......@@ -53,30 +53,6 @@ import GHC.Read
import GHC.Base
import Data.Type.Bool
-- | Lifted, homogeneous equality. By lifted, we mean that it can be
-- bogus (deferred type error). By homogeneous, the two types @a@
-- and @b@ must have the same kind.
class a ~~ b => (a :: k) ~ (b :: k)
-- See Note [The equality types story] in TysPrim
-- NB: All this class does is to wrap its superclass, which is
-- the "real", inhomogeneous equality; this is needed when
-- we have a Given (a~b), and we want to prove things from it
-- NB: Not exported, as (~) is magical syntax. That's also why there's
-- no fixity.
-- It's tempting to put functional dependencies on (~), but it's not
-- necessary because the functional-dependency coverage check looks
-- through superclasses, and (~#) is handled in that check.
-- | @since 4.9.0.0
instance {-# INCOHERENT #-} a ~~ b => a ~ b
-- See Note [The equality types story] in TysPrim
-- If we have a Wanted (t1 ~ t2), we want to immediately
-- simplify it to (t1 ~~ t2) and solve that instead
--
-- INCOHERENT because we want to use this instance eagerly, even when
-- the tyvars are partially unknown.
infix 4 :~:, :~~:
-- | Propositional equality. If @a :~: b@ is inhabited by some terminating
......
......@@ -211,6 +211,12 @@ inside GHC, to change the kind and type.
class a ~~ b
-- See also Note [The equality types story] in TysPrim
-- | Lifted, homogeneous equality. By lifted, we mean that it
-- can be bogus (deferred type error). By homogeneous, the two
-- types @a@ and @b@ must have the sme kinds.
class a ~ b
-- See also Note [The equality types story] in TysPrim
-- | @Coercible@ is a two-parameter class that has instances for types @a@ and @b@ if
-- the compiler can infer that they have the same representation. This class
-- does not have regular instances; instead they are created on-the-fly during
......
class (a ~ b) => (~) (a :: k) (b :: k)
-- Defined in ‘Data.Type.Equality’
instance [incoherent] forall k (a :: k) (b :: k). (a ~ b) => a ~ b
-- Defined in ‘Data.Type.Equality’
(~) :: k -> k -> Constraint
class (a ~~ b) => (~) (a :: k) (b :: k)
-- Defined in ‘Data.Type.Equality’
instance [incoherent] forall k (a :: k) (b :: k). (a ~~ b) => a ~ b
-- Defined in ‘Data.Type.Equality’
class (a ~ b) => (~) (a :: k0) (b :: k0) -- Defined in ‘GHC.Types’
(~) :: k0 -> k0 -> Constraint
class (a GHC.Prim.~# b) => (~) (a :: k0) (b :: k0)
-- Defined in ‘GHC.Types’
Rule fired: Class op signum (BUILTIN)
Rule fired: Class op abs (BUILTIN)
Rule fired: Class op heq_sel (BUILTIN)
Rule fired: normalize/Double (T7837)
Rule fired: Class op heq_sel (BUILTIN)
Rule fired: Class op eq_sel (BUILTIN)
Rule fired: Class op $p1Norm (BUILTIN)
Rule fired: Class op / (BUILTIN)
Rule fired: Class op norm (BUILTIN)
......@@ -1033,13 +1033,14 @@ test('T10547',
test('T12227',
[ only_ways(['normal']),
compiler_stats_num_field('bytes allocated',
[(wordsize(64), 812869424, 5),
[(wordsize(64), 752214784, 5),
# 2016-07-11 5650186880 (Windows) before fix for #12227
# 2016-07-11 1822822016 (Windows) after fix for #12227
# 2016-12-20 1715827784 after d250d493 (INLINE in Traversable dms)
# (or thereabouts in the commit history)
# 2017-02-14 1060158624 Early inlining: 35% improvement
# 2018-01-04 812869424 Drop unused givens (#13032): 23% better
# 2018-06-27 752214784 Trac #15421
]),
],
compile,
......@@ -1090,8 +1091,9 @@ test('T12234',
test('T12545',
[ only_ways(['normal']),
compiler_stats_num_field('bytes allocated',
[(wordsize(64), 3538652464, 5),
[(wordsize(64), 3249613688, 5),
# 2017-06-08 3538652464 initial
# 2018-06-27 3249613688 Trac #15421
]),
extra_clean(['T12545a.hi', 'T12545a.o'])
],
......
......@@ -96,8 +96,7 @@ $krep [InlPrag=NOUSERINLINE[~]]
= GHC.Types.KindRepTyConApp GHC.Types.$tcConstraint []
$krep [InlPrag=NOUSERINLINE[~]]
= GHC.Types.KindRepTyConApp
Data.Type.Equality.$tc~
((:) GHC.Types.krep$* ((:) $krep ((:) $krep [])))
GHC.Types.$tc~ ((:) GHC.Types.krep$* ((:) $krep ((:) $krep [])))
$krep [InlPrag=NOUSERINLINE[~]]
= GHC.Types.KindRepTyConApp Roles3.$tcC2 ((:) $krep ((:) $krep []))
$krep [InlPrag=NOUSERINLINE[~]]
......
......@@ -8,9 +8,9 @@ newtype Bar_13 :: * -> GHC.Types.Bool -> *
= MkBar_14 :: a_15 -> Bar_13 a_15 b_16
data T10828.T (a_0 :: *) where
T10828.MkT :: forall (a_1 :: *) . a_1 -> a_1 -> T10828.T a_1
T10828.MkC :: forall (a_2 :: *) (b_3 :: *) . (Data.Type.Equality.~) a_2
GHC.Types.Int => {T10828.foo :: a_2,
T10828.bar :: b_3} -> T10828.T GHC.Types.Int
T10828.MkC :: forall (a_2 :: *) (b_3 :: *) . (GHC.Types.~) a_2
GHC.Types.Int => {T10828.foo :: a_2,
T10828.bar :: b_3} -> T10828.T GHC.Types.Int
data T'_0 a_1 :: * where
MkT'_2 :: a_3 -> a_3 -> T'_0 a_3
MkC'_4 :: forall a_5 b_6 . a_5 ~ GHC.Types.Int => {foo_7 :: a_5,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment