diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2015-10-30 20:22:42 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-10-30 20:22:44 +0100 |
commit | 91c6b1f54aea658b0056caec45655475897f1972 (patch) | |
tree | aeb80a04e102e51dfd41343d4f697baf34c95739 /testsuite/tests | |
parent | 59e728bc0b47116e3c9a8b21b14dc3198531b9a9 (diff) | |
download | haskell-91c6b1f54aea658b0056caec45655475897f1972.tar.gz |
Generate Typeable info at definition sites
This is the second attempt at merging D757.
This patch implements the idea floated in Trac #9858, namely that we
should generate type-representation information at the data type
declaration site, rather than when solving a Typeable constraint.
However, this turned out quite a bit harder than I expected. I still
think it's the right thing to do, and it's done now, but it was quite
a struggle.
See particularly
* Note [Grand plan for Typeable] in TcTypeable (which is a new module)
* Note [The overall promotion story] in DataCon (clarifies existing
stuff)
The most painful bit was that to generate Typeable instances (ie
TyConRepName bindings) for every TyCon is tricky for types in ghc-prim
etc:
* We need to have enough data types around to *define* a TyCon
* Many of these types are wired-in
Also, to minimise the code generated for each data type, I wanted to
generate pure data, not CAFs with unpackCString# stuff floating about.
Performance
~~~~~~~~~~~
Three perf/compiler tests start to allocate quite a bit more. This isn't
surprising, because they all allocate zillions of data types, with
practically no other code, esp. T1969
* T1969: GHC allocates 19% more
* T4801: GHC allocates 13% more
* T5321FD: GHC allocates 13% more
* T9675: GHC allocates 11% more
* T783: GHC allocates 11% more
* T5642: GHC allocates 10% more
I'm treating this as acceptable. The payoff comes in Typeable-heavy
code.
Remaining to do
~~~~~~~~~~~~~~~
* I think that "TyCon" and "Module" are over-generic names to use for
the runtime type representations used in GHC.Typeable. Better might
be
"TrTyCon" and "TrModule". But I have not yet done this
* Add more info the the "TyCon" e.g. source location where it was
defined
* Use the new "Module" type to help with Trac Trac #10068
* It would be possible to generate TyConRepName (ie Typeable
instances) selectively rather than all the time. We'd need to persist
the information in interface files. Lacking a motivating reason I
have
not done this, but it would not be difficult.
Refactoring
~~~~~~~~~~~
As is so often the case, I ended up refactoring more than I intended.
In particular
* In TyCon, a type *family* (whether type or data) is repesented by a
FamilyTyCon
* a algebraic data type (including data/newtype instances) is
represented by AlgTyCon This wasn't true before; a data family
was represented as an AlgTyCon. There are some corresponding
changes in IfaceSyn.
* Also get rid of the (unhelpfully named) tyConParent.
* In TyCon define 'Promoted', isomorphic to Maybe, used when things are
optionally promoted; and use it elsewhere in GHC.
* Cleanup handling of knownKeyNames
* Each TyCon, including promoted TyCons, contains its TyConRepName, if
it has one. This is, in effect, the name of its Typeable instance.
Updates haddock submodule
Test Plan: Let Harbormaster validate
Reviewers: austin, hvr, goldfire
Subscribers: goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D1404
GHC Trac Issues: #9858
Diffstat (limited to 'testsuite/tests')
56 files changed, 583 insertions, 126 deletions
diff --git a/testsuite/tests/codeGen/should_run/cgrun057.stderr b/testsuite/tests/codeGen/should_run/cgrun057.stderr index 64a4028b02..262d74912d 100644 --- a/testsuite/tests/codeGen/should_run/cgrun057.stderr +++ b/testsuite/tests/codeGen/should_run/cgrun057.stderr @@ -1,4 +1,4 @@ -*** Exception (reporting due to +RTS -xc): (THUNK_1_0), stack trace: +*** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace: Main.g, called from Main.f, called from Main.main, diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr index cd14bd1754..b4aa53d787 100644 --- a/testsuite/tests/deSugar/should_compile/T2431.stderr +++ b/testsuite/tests/deSugar/should_compile/T2431.stderr @@ -1,6 +1,6 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 8, types: 19, coercions: 1} +Result size of Tidy Core = {terms: 27, types: 24, coercions: 1} -- RHS size: {terms: 2, types: 3, coercions: 1} T2431.$WRefl [InlPrag=INLINE] :: forall a. a :~: a @@ -13,10 +13,35 @@ T2431.$WRefl [InlPrag=INLINE] :: forall a. a :~: a Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a ~# a)}] T2431.$WRefl = \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a ~# a) +-- RHS size: {terms: 2, types: 0, coercions: 0} +a :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a = TrNameS "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +a1 :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a1 = TrNameS "T2431"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +T2431.$trModule :: Module +[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType] +T2431.$trModule = Module a a1 + +-- RHS size: {terms: 2, types: 0, coercions: 0} +a2 :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a2 = TrNameS ":~:"# + +-- RHS size: {terms: 5, types: 0, coercions: 0} +T2431.$tc:~: :: TyCon +[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType] +T2431.$tc:~: = TyCon 0## 0## T2431.$trModule a2 + -- RHS size: {terms: 4, types: 7, coercions: 0} absurd :: forall a. Int :~: Bool -> a [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>b] -absurd = \ (@ a) (x :: Int :~: Bool) -> case x of _ [Occ=Dead] { } +absurd = \ (@ a3) (x :: Int :~: Bool) -> case x of _ [Occ=Dead] { } diff --git a/testsuite/tests/deriving/should_fail/T9687.stderr b/testsuite/tests/deriving/should_fail/T9687.stderr index ad95393db7..36425e48c8 100644 --- a/testsuite/tests/deriving/should_fail/T9687.stderr +++ b/testsuite/tests/deriving/should_fail/T9687.stderr @@ -1,3 +1,3 @@ -T9687.hs:4:10: - Class `Typeable` does not support user-specified instances. +T9687.hs:4:10: error: + Class ‘Typeable’ does not support user-specified instances diff --git a/testsuite/tests/ghci.debugger/scripts/T2740.stdout b/testsuite/tests/ghci.debugger/scripts/T2740.stdout index c6733bca9d..1f3e6d9ac5 100644 --- a/testsuite/tests/ghci.debugger/scripts/T2740.stdout +++ b/testsuite/tests/ghci.debugger/scripts/T2740.stdout @@ -1,5 +1,5 @@ Stopped at T2740.hs:(3,1)-(4,25) -_result :: a = _ +_result :: a2 = _ Stopped at T2740.hs:3:11-13 _result :: Bool = _ x :: Integer = 1 diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stderr b/testsuite/tests/ghci.debugger/scripts/break006.stderr index b6e3cc9b12..56f40f2b21 100644 --- a/testsuite/tests/ghci.debugger/scripts/break006.stderr +++ b/testsuite/tests/ghci.debugger/scripts/break006.stderr @@ -12,7 +12,7 @@ Show (f a) => Show (Alt f a) -- Defined in ‘Data.Monoid’ - ...plus 33 others + ...plus 36 others (use -fprint-potential-instances to see them all) In a stmt of an interactive GHCi command: print it @@ -29,6 +29,6 @@ Show (f a) => Show (Alt f a) -- Defined in ‘Data.Monoid’ - ...plus 33 others + ...plus 36 others (use -fprint-potential-instances to see them all) In a stmt of an interactive GHCi command: print it diff --git a/testsuite/tests/ghci.debugger/scripts/break009.stdout b/testsuite/tests/ghci.debugger/scripts/break009.stdout index b926ed2474..14543668a1 100644 --- a/testsuite/tests/ghci.debugger/scripts/break009.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break009.stdout @@ -1,6 +1,6 @@ Breakpoint 0 activated at ../Test6.hs:5:8-11 Stopped at ../Test6.hs:5:8-11 -_result :: a = _ +_result :: a2 = _ *** Exception: Prelude.head: empty list CallStack: - error, called at libraries/base/GHC/List.hs:1009:3 in base:GHC.List + error, called at libraries/base/GHC/List.hs:999:3 in base:GHC.List diff --git a/testsuite/tests/ghci.debugger/scripts/break010.stdout b/testsuite/tests/ghci.debugger/scripts/break010.stdout index 2751b6d160..682f4c3c1c 100644 --- a/testsuite/tests/ghci.debugger/scripts/break010.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break010.stdout @@ -1,5 +1,5 @@ Breakpoint 0 activated at ../Test6.hs:5:8-11 Stopped at ../Test6.hs:5:8-11 -_result :: a = _ +_result :: a2 = _ Stopped at ../Test6.hs:5:8-11 -_result :: a = _ +_result :: a2 = _ diff --git a/testsuite/tests/ghci.debugger/scripts/break011.stdout b/testsuite/tests/ghci.debugger/scripts/break011.stdout index dafc1fc397..67bbec7ce1 100644 --- a/testsuite/tests/ghci.debugger/scripts/break011.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break011.stdout @@ -9,12 +9,12 @@ _exception :: e = _ -2 : main (../Test7.hs:2:8-29) <end of history> Logged breakpoint at ../Test7.hs:2:18-28 -_result :: a12 +_result :: a14 Logged breakpoint at ../Test7.hs:2:8-29 -_result :: IO a12 +_result :: IO a14 no more logged breakpoints Logged breakpoint at ../Test7.hs:2:18-28 -_result :: a12 +_result :: a14 Stopped at <exception thrown> _exception :: e already at the beginning of the history @@ -23,7 +23,7 @@ _exception = SomeException "foo" "CallStack: error, called at ../Test7.hs:2:18 in main:Main") -_result :: a12 = _ +_result :: a14 = _ _exception :: SomeException = SomeException (ErrorCallWithLocation "foo" diff --git a/testsuite/tests/ghci.debugger/scripts/break012.stdout b/testsuite/tests/ghci.debugger/scripts/break012.stdout index 70fa0f37b9..88e8b3ee71 100644 --- a/testsuite/tests/ghci.debugger/scripts/break012.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break012.stdout @@ -1,16 +1,16 @@ Stopped at break012.hs:(1,1)-(5,18) -_result :: (t, a1 -> a1, (), a -> a -> a) = _ +_result :: (t, a3 -> a3, (), a2 -> a2 -> a2) = _ Stopped at break012.hs:5:10-18 -_result :: (t, a1 -> a1, (), a -> a -> a) = _ +_result :: (t, a3 -> a3, (), a2 -> a2 -> a2) = _ a :: t = _ -b :: a2 -> a2 = _ +b :: a4 -> a4 = _ c :: () = _ -d :: a -> a -> a = _ +d :: a2 -> a2 -> a2 = _ a :: t -b :: a2 -> a2 +b :: a4 -> a4 c :: () -d :: a -> a -> a +d :: a2 -> a2 -> a2 a = (_t1::t) -b = (_t2::a2 -> a2) +b = (_t2::a4 -> a4) c = (_t3::()) -d = (_t4::a -> a -> a) +d = (_t4::a2 -> a2 -> a2) diff --git a/testsuite/tests/ghci.debugger/scripts/break018.stdout b/testsuite/tests/ghci.debugger/scripts/break018.stdout index a12e119a42..11ef5476b5 100644 --- a/testsuite/tests/ghci.debugger/scripts/break018.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break018.stdout @@ -1,5 +1,5 @@ Stopped at ../mdo.hs:(30,1)-(32,27) -_result :: IO (N a) = _ +_result :: IO (N a6) = _ Stopped at ../mdo.hs:(30,16)-(32,27) _result :: IO (N Char) = _ x :: Char = 'h' @@ -10,4 +10,4 @@ f :: N Char = _ l :: N Char = _ x :: Char = 'h' Stopped at ../mdo.hs:(8,1)-(9,42) -_result :: IO (N a) = _ +_result :: IO (N a6) = _ diff --git a/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout b/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout index 99ac58dec2..a87ffce942 100644 --- a/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout @@ -1,6 +1,6 @@ Breakpoint 0 activated at A.hs:4:1-9 Stopped at A.hs:4:1-9 -_result :: a1 = _ +_result :: a3 = _ Stopped at A.hs:4:7-9 _result :: () = _ x :: () = () diff --git a/testsuite/tests/ghci.debugger/scripts/break028.stdout b/testsuite/tests/ghci.debugger/scripts/break028.stdout index 2438d73a14..896a2416ef 100644 --- a/testsuite/tests/ghci.debugger/scripts/break028.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break028.stdout @@ -1,5 +1,5 @@ Stopped at break028.hs:15:1-24 -_result :: Id a = _ +_result :: Id a3 = _ Stopped at break028.hs:15:23-24 -_result :: Id a = _ -x' :: Id a = _ +_result :: Id a3 = _ +x' :: Id a3 = _ diff --git a/testsuite/tests/ghci.debugger/scripts/print018.stdout b/testsuite/tests/ghci.debugger/scripts/print018.stdout index d5b7d4603c..a00d5374dd 100644 --- a/testsuite/tests/ghci.debugger/scripts/print018.stdout +++ b/testsuite/tests/ghci.debugger/scripts/print018.stdout @@ -3,9 +3,9 @@ Stopped at ../Test.hs:40:1-17 _result :: () = _ Stopped at ../Test.hs:40:10-17 _result :: () = _ -x :: a17 = _ -x = (_t1::a17) -x :: a17 +x :: a36 = _ +x = (_t1::a36) +x :: a36 () x = Unary x :: Unary diff --git a/testsuite/tests/ghci.debugger/scripts/print019.stderr b/testsuite/tests/ghci.debugger/scripts/print019.stderr index 894c553805..3c0edbde5a 100644 --- a/testsuite/tests/ghci.debugger/scripts/print019.stderr +++ b/testsuite/tests/ghci.debugger/scripts/print019.stderr @@ -5,9 +5,9 @@ Use :print or :force to determine these types Relevant bindings include it :: a1 (bound at <interactive>:10:1) These potential instances exist: - instance Show TyCon -- Defined in ‘Data.Typeable.Internal’ instance Show TypeRep -- Defined in ‘Data.Typeable.Internal’ + instance Show Module -- Defined in ‘GHC.Show’ instance Show Ordering -- Defined in ‘GHC.Show’ - ...plus 30 others + ...plus 32 others (use -fprint-potential-instances to see them all) In a stmt of an interactive GHCi command: print it diff --git a/testsuite/tests/ghci.debugger/scripts/print031.stdout b/testsuite/tests/ghci.debugger/scripts/print031.stdout index 529b6987b5..da3e14238d 100644 --- a/testsuite/tests/ghci.debugger/scripts/print031.stdout +++ b/testsuite/tests/ghci.debugger/scripts/print031.stdout @@ -4,5 +4,5 @@ Stopped at print031.hs:7:1-19 _result :: Bool = _ Stopped at print031.hs:7:7-19 _result :: Bool = _ -x :: t (Phantom a) = [Just (Phantom 1)] +x :: t (Phantom a5) = [Just (Phantom 1)] x = [Just (Phantom 1)] diff --git a/testsuite/tests/ghci/scripts/T4175.stdout b/testsuite/tests/ghci/scripts/T4175.stdout index 7c063a6481..cea9a01264 100644 --- a/testsuite/tests/ghci/scripts/T4175.stdout +++ b/testsuite/tests/ghci/scripts/T4175.stdout @@ -2,9 +2,7 @@ type family A a b :: * -- Defined at T4175.hs:7:1 type instance A (B a) b = () -- Defined at T4175.hs:10:1 type instance A (Maybe a) a = a -- Defined at T4175.hs:9:1 type instance A Int Int = () -- Defined at T4175.hs:8:1 -type role B nominal -data family B a - -- Defined at T4175.hs:12:1 +data family B a -- Defined at T4175.hs:12:1 instance G B -- Defined at T4175.hs:34:10 data instance B () = MkB -- Defined at T4175.hs:13:15 type instance A (B a) b = () -- Defined at T4175.hs:10:1 diff --git a/testsuite/tests/ghci/scripts/T5417.stdout b/testsuite/tests/ghci/scripts/T5417.stdout index 2640c4e04c..06329d9a1d 100644 --- a/testsuite/tests/ghci/scripts/T5417.stdout +++ b/testsuite/tests/ghci/scripts/T5417.stdout @@ -1,9 +1,7 @@ -data B1 a = B1 a
-data instance C.F (B1 a) = B2 a
-type role D nominal
-data family D a
-class C.C1 a where
- type role C.F nominal
- data family C.F a
- -- Defined at T5417a.hs:5:5
-data instance C.F (B1 a) = B2 a -- Defined at T5417.hs:8:10
+data B1 a = B1 a +data instance C.F (B1 a) = B2 a +data family D a +class C.C1 a where + data family C.F a + -- Defined at T5417a.hs:5:5 +data instance C.F (B1 a) = B2 a -- Defined at T5417.hs:8:10 diff --git a/testsuite/tests/ghci/scripts/T8674.stdout b/testsuite/tests/ghci/scripts/T8674.stdout index 6c13176e66..45d4f0af0e 100644 --- a/testsuite/tests/ghci/scripts/T8674.stdout +++ b/testsuite/tests/ghci/scripts/T8674.stdout @@ -1,5 +1,3 @@ -type role Sing nominal -data family Sing (a :: k) - -- Defined at T8674.hs:4:1 +data family Sing (a :: k) -- Defined at T8674.hs:4:1 data instance Sing Bool = SBool -- Defined at T8674.hs:6:15 data instance Sing a = SNil -- Defined at T8674.hs:5:15 diff --git a/testsuite/tests/indexed-types/should_compile/T3017.stderr b/testsuite/tests/indexed-types/should_compile/T3017.stderr index 2d2187c5a7..57e8b0d397 100644 --- a/testsuite/tests/indexed-types/should_compile/T3017.stderr +++ b/testsuite/tests/indexed-types/should_compile/T3017.stderr @@ -1,21 +1,21 @@ -TYPE SIGNATURES
- emptyL :: forall a. ListColl a
- test2 ::
- forall c t t1. (Num t, Num t1, Coll c, Elem c ~ (t, t1)) => c -> c
-TYPE CONSTRUCTORS
- class Coll c where
- type family Elem c :: * open
- empty :: c
- insert :: Elem c -> c -> c
- {-# MINIMAL empty, insert #-}
- data ListColl a = L [a]
- Promotable
-COERCION AXIOMS
- axiom Foo.TFCo:R:ElemListColl :: Elem (ListColl a) = a
-INSTANCES
- instance Coll (ListColl a) -- Defined at T3017.hs:12:11
-FAMILY INSTANCES
- type Elem (ListColl a)
-Dependent modules: []
-Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0,
- integer-gmp-1.0.0.0]
+TYPE SIGNATURES + emptyL :: forall a. ListColl a + test2 :: + forall c t t1. (Num t, Num t1, Coll c, Elem c ~ (t, t1)) => c -> c +TYPE CONSTRUCTORS + class Coll c where + type family Elem c :: * open + empty :: c + insert :: Elem c -> c -> c + {-# MINIMAL empty, insert #-} + data ListColl a = L [a] + Promotable +COERCION AXIOMS + axiom Foo.TFCo:R:ElemListColl :: Elem (ListColl a) = a +INSTANCES + instance Coll (ListColl a) -- Defined at T3017.hs:12:11 +FAMILY INSTANCES + type Elem (ListColl a) +Dependent modules: [] +Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0, + integer-gmp-1.0.0.0] diff --git a/testsuite/tests/numeric/should_compile/T7116.stdout b/testsuite/tests/numeric/should_compile/T7116.stdout index 6d4b412ba7..c9d744d6be 100644 --- a/testsuite/tests/numeric/should_compile/T7116.stdout +++ b/testsuite/tests/numeric/should_compile/T7116.stdout @@ -1,6 +1,33 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 22, types: 14, coercions: 0} +Result size of Tidy Core = {terms: 32, types: 17, coercions: 0} + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T7116.$trModule2 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] +T7116.$trModule2 = TrNameS "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T7116.$trModule1 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}] +T7116.$trModule1 = TrNameS "T7116"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +T7116.$trModule :: Module +[GblId[ReflectionId], + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] +T7116.$trModule = Module T7116.$trModule2 T7116.$trModule1 -- RHS size: {terms: 8, types: 3, coercions: 0} dr :: Double -> Double diff --git a/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr b/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr index 7faa9207a4..dbc250d794 100644 --- a/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr +++ b/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr @@ -5,9 +5,9 @@ overloadedlistsfail01.hs:5:8: error: Probable fix: use a type annotation to specify what ‘a0’ should be. These potential instances exist: instance [safe] Show Version -- Defined in ‘Data.Version’ + instance Show Module -- Defined in ‘GHC.Show’ instance Show Ordering -- Defined in ‘GHC.Show’ - instance Show Integer -- Defined in ‘GHC.Show’ - ...plus 23 others + ...plus 26 others (use -fprint-potential-instances to see them all) In the expression: print [1] In an equation for ‘main’: main = print [1] diff --git a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr index 6ca37a9434..c2768c4d37 100644 --- a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr +++ b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr @@ -3,9 +3,7 @@ TYPE SIGNATURES TYPE CONSTRUCTORS data MyKind = A | B Promotable - type role Sing nominal data family Sing (a :: k) - RecFlag: Recursive COERCION AXIOMS axiom DataFamilyInstanceLHS.TFCo:R:SingMyKind_ :: Sing = DataFamilyInstanceLHS.R:SingMyKind_ diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index 9eb2d20aaa..bb43c47d9e 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -37,7 +37,7 @@ test('T1969', # 2013-02-10 14 (x86/OSX) # 2013-11-13 17 (x86/Windows, 64bit machine) # 2015-07-11 21 (x86/Linux, 64bit machine) use +RTS -G1 - (wordsize(64), 41, 20)]), + (wordsize(64), 55, 20)]), # 28 (amd64/Linux) # 34 (amd64/Linux) # 2012-09-20 23 (amd64/Linux) @@ -48,6 +48,7 @@ test('T1969', # 2013-09-11 30, 10 (amd64/Linux) # 2013-09-11 30, 15 (adapt to Phab CI) # 2015-06-03 41, (amd64/Linux) use +RTS -G1 + # 2015-10-28 55, (amd64/Linux) emit Typeable at definition site compiler_stats_num_field('max_bytes_used', [(platform('i386-unknown-mingw32'), 5719436, 20), # 2010-05-17 5717704 (x86/Windows) @@ -61,7 +62,7 @@ test('T1969', # 2014-01-22 6429864 (x86/Linux) # 2014-06-29 5949188 (x86/Linux) # 2015-07-11 6241108 (x86/Linux, 64bit machine) use +RTS -G1 - (wordsize(64), 11000000, 15)]), + (wordsize(64), 15017528, 15)]), # 2014-09-10 10463640, 10 # post-AMP-update (somewhat stabelish) # looks like the peak is around ~10M, but we're # unlikely to GC exactly on the peak. @@ -71,6 +72,7 @@ test('T1969', # 2014-09-14 9684256, 10 # try to lower it a bit more to match Phab's CI # 2014-11-03 10584344, # ghcspeed reports higher numbers consistently # 2015-07-11 11670120 (amd64/Linux) + # 2015-10-28 15017528 (amd64/Linux) emit typeable at definition site compiler_stats_num_field('bytes allocated', [(platform('i386-unknown-mingw32'), 301784492, 5), # 215582916 (x86/Windows) @@ -86,7 +88,7 @@ test('T1969', # 2014-01-22 316103268 (x86/Linux) # 2014-06-29 303300692 (x86/Linux) # 2015-07-11 288699104 (x86/Linux, 64-bit machine) use +RTS -G1 - (wordsize(64), 581460896, 5)]), + (wordsize(64), 695430728, 5)]), # 17/11/2009 434845560 (amd64/Linux) # 08/12/2009 459776680 (amd64/Linux) # 17/05/2010 519377728 (amd64/Linux) @@ -105,6 +107,7 @@ test('T1969', # 17/07/2014 651626680 (x86_64/Linux) roundabout update # 10/09/2014 630299456 (x86_64/Linux) post-AMP-cleanup # 03/06/2015 581460896 (x86_64/Linux) use +RTS -G1 + # 28/10/2015 695430728 (x86_64/Linux) emit Typeable at definition site only_ways(['normal']), extra_hc_opts('-dcore-lint -static'), @@ -142,7 +145,7 @@ test('T3294', # 2014-12-22 26525384 (x86/Windows) Increase due to silent superclasses? # 2015-07-11 43196344 (x86/Linux, 64-bit machine) use +RTS -G1 - (wordsize(64), 45000000, 20)]), + (wordsize(64), 50367248, 20)]), # prev: 25753192 (amd64/Linux) # 29/08/2012: 37724352 (amd64/Linux) # (increase due to new codegen, see #7198) @@ -156,6 +159,8 @@ test('T3294', # (reason unknown, setting expected value somewhere in between) # 2015-01-22: 45000000 (amd64/Linux) # varies between 40959592 and 52914488... increasing to +-20% + # 2015-10-28: 50367248 (amd64/Linux) + # D757: emit Typeable instances at site of type definition compiler_stats_num_field('bytes allocated', [(wordsize(32), 1377050640, 5), @@ -215,12 +220,13 @@ test('T4801', # 2014-01-22: 211198056 (x86/Linux) # 2014-09-03: 185242032 (Windows laptop) # 2014-12-01: 203962148 (Windows laptop) - (wordsize(64), 382056344, 10)]), + (wordsize(64), 434278248, 10)]), # prev: 360243576 (amd64/Linux) # 19/10/2012: 447190832 (amd64/Linux) (-fPIC turned on) # 19/10/2012: 392409984 (amd64/Linux) (-fPIC turned off) # 2014-04-08: 362939272 (amd64/Linux) cumulation of various smaller improvements over recent commits # 2014-10-08: 382056344 (amd64/Linux) stricter foldr2 488e95b + # 2015-10-28: 434278248 (amd64/Linux) emit Typeable at definition site ################################### # deactivated for now, as this metric became too volatile recently @@ -416,7 +422,7 @@ test('T783', # 2014-09-03: 223377364 (Windows) better specialisation, raft of core-to-core optimisations # 2014-12-22: 235002220 (Windows) not sure why - (wordsize(64), 470738808, 10)]), + (wordsize(64), 526230456, 10)]), # prev: 349263216 (amd64/Linux) # 07/08/2012: 384479856 (amd64/Linux) # 29/08/2012: 436927840 (amd64/Linux) @@ -429,16 +435,18 @@ test('T783', # (fix previous fix for #8456) # 2014-07-17: 640031840 (amd64/Linux) # (general round of updates) - # 2014-08-29: 441932632 (amd64/Linux) + # 2014-08-29: 441932632 (amd64/Linux) # (better specialisation, raft of core-to-core optimisations) - # 2014-08-29: 719814352 (amd64/Linux) - # (changed order of cmm block causes analyses to allocate much more, - # but the changed order is slighly better in terms of runtime, and - # this test seems to be an extreme outlier.) - # 2015-05-16: 548288760 (amd64/Linux) - # (improved sequenceBlocks in nativeCodeGen, #10422) - # 2015-08-07: 470738808 (amd64/Linux) - # (simplifying the switch plan code path for simple checks, #10677) + # 2014-08-29: 719814352 (amd64/Linux) + # (changed order of cmm block causes analyses to allocate much more, + # but the changed order is slighly better in terms of runtime, and + # this test seems to be an extreme outlier.) + # 2015-05-16: 548288760 (amd64/Linux) + # (improved sequenceBlocks in nativeCodeGen, #10422) + # 2015-08-07: 470738808 (amd64/Linux) + # (simplifying the switch plan code path for simple checks, #10677) + # 2015-08-28: 526230456 (amd64/Linux) + # (D757: Emit Typeable instances at site of type definition) extra_hc_opts('-static') ], compile,['']) @@ -477,7 +485,7 @@ test('T5321FD', # (increase due to new codegen) # 2014-07-31: 211699816 (Windows) (-11%) # (due to better optCoercion, 5e7406d9, #9233) - (wordsize(64), 470895536, 10)]) + (wordsize(64), 532365376, 10)]) # prev: 418306336 # 29/08/2012: 492905640 # (increase due to new codegen) @@ -494,6 +502,8 @@ test('T5321FD', # 2015-08-10: 470895536 # (undefined now takes an implicit parameter and GHC -O0 does # not recognize that the application is bottom) + # 2015-10-28: 532365376 + # D757: emit Typeable instances at site of type definition ], compile,['']) @@ -506,7 +516,7 @@ test('T5642', # 2014-09-03: 753045568 # 2014-12-10: 641085256 Improvements in constraints solver - (wordsize(64), 1282916024, 10)]) + (wordsize(64), 1412808976, 10)]) # prev: 1300000000 # 2014-07-17: 1358833928 (general round of updates) # 2014-08-07: 1402242360 (caused by 1fc60ea) @@ -517,6 +527,7 @@ test('T5642', # It's a bizarre program with LOTS of data types) # 2014-09-10: 1536924976 post-AMP-cleanup # 2014-12-10: 1282916024 Improvements in constraints solver + # 2015-10-28: 1412808976 Emit Typeable at definition site ], compile,['-O']) @@ -590,12 +601,13 @@ test('T9020', test('T9675', [ only_ways(['optasm']), compiler_stats_num_field('max_bytes_used', # Note [residency] - [(wordsize(64), 28056344, 15), + [(wordsize(64), 23776640, 15), # 2014-10-13 29596552 # 2014-10-13 26570896 seq the DmdEnv in seqDmdType as well # 2014-10-13 18582472 different machines giving different results.. # 2014-10-13 22220552 use the mean # 2015-06-21 28056344 switch to `+RTS -G1`, tighten bound to 15% + # 2015-10-28 23776640 emit Typeable at definition site (wordsize(32), 15341228, 15) # 2015-07-11 15341228 (x86/Linux, 64-bit machine) use +RTS -G1 ]), @@ -611,8 +623,9 @@ test('T9675', # 2015-07-11 56 (x86/Linux, 64-bit machine) use +RTS -G1 ]), compiler_stats_num_field('bytes allocated', - [(wordsize(64), 544489040, 10) + [(wordsize(64), 608284152, 10) # 2014-10-13 544489040 + # 2015-10-28 608284152 emit Typeable at definition site ,(wordsize(32), 279480696, 10) # 2015-07-11 279480696 (x86/Linux, 64-bit machine) use +RTS -G1 ]), @@ -679,10 +692,11 @@ test('T9872d', test('T9961', [ only_ways(['normal']), compiler_stats_num_field('bytes allocated', - [(wordsize(64), 663978160, 5), + [(wordsize(64), 708680480, 5), # 2015-01-12 807117816 Initally created # 2015-spring 772510192 Got better # 2015-05-22 663978160 Fix for #10370 improves it more + # 2015-10-28 708680480 Emit Typeable at definition site (wordsize(32), 375647160, 5) ]), ], diff --git a/testsuite/tests/perf/should_run/all.T b/testsuite/tests/perf/should_run/all.T index 262f4e12fa..6ac8861450 100644 --- a/testsuite/tests/perf/should_run/all.T +++ b/testsuite/tests/perf/should_run/all.T @@ -184,11 +184,12 @@ test('T5205', [stats_num_field('bytes allocated', [(wordsize(32), 47088, 5), # expected value: 47088 (x86/Darwin) - (wordsize(64), 50648, 7)]), + (wordsize(64), 56208, 7)]), # expected value: 51320 (amd64/Linux) # 2014-07-17: 52600 (amd64/Linux) general round of updates # 2015-04-03: Widen 5->7% (amd64/Windows was doing better) # 2015-08-15: 50648 (Windows too good. avg of Windows&Linux) + # 2015-10-30: 56208 (D757: Emit Typeable at definition site) only_ways(['normal', 'optasm']) ], compile_and_run, @@ -409,9 +410,10 @@ test('InlineCloneArrayAlloc', test('T9203', [stats_num_field('bytes allocated', [ (wordsize(32), 50000000, 5) - , (wordsize(64), 94547280, 5) ]), + , (wordsize(64), 95451192, 5) ]), # was 95747304 # 2019-09-10 94547280 post-AMP cleanup + # 2015-10-28 95451192 emit Typeable at definition site only_ways(['normal'])], compile_and_run, ['-O2']) diff --git a/testsuite/tests/polykinds/T8132.stderr b/testsuite/tests/polykinds/T8132.stderr index e4c46591c3..4a1ca2b4f6 100644 --- a/testsuite/tests/polykinds/T8132.stderr +++ b/testsuite/tests/polykinds/T8132.stderr @@ -1,3 +1,3 @@ -T8132.hs:6:10: - Class `Typeable` does not support user-specified instances. +T8132.hs:6:10: error: + Class ‘Typeable’ does not support user-specified instances diff --git a/testsuite/tests/quasiquotation/T7918.stdout b/testsuite/tests/quasiquotation/T7918.stdout index f4d406b591..4dff68d1ce 100644 --- a/testsuite/tests/quasiquotation/T7918.stdout +++ b/testsuite/tests/quasiquotation/T7918.stdout @@ -25,3 +25,6 @@ (undefined, T7918B.hs:18:16-24) (y, T7918B.hs:19:9-12) (undefined, T7918B.hs:19:16-24) +(Module, <no location info>) +(TrNameS, <no location info>) +(TrNameS, <no location info>) diff --git a/testsuite/tests/roles/should_compile/Roles1.stderr b/testsuite/tests/roles/should_compile/Roles1.stderr index d9f9943d63..a4beb6454d 100644 --- a/testsuite/tests/roles/should_compile/Roles1.stderr +++ b/testsuite/tests/roles/should_compile/Roles1.stderr @@ -21,4 +21,65 @@ Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0, integer-gmp-1.0.0.0] ==================== Typechecker ==================== +Roles1.$tcT7 + = TyCon + 12795488517584970699## + 6852268802866176810## + Roles1.$trModule + (TrNameS "T7"#) +Roles1.$tcT6 + = TyCon + 1052116432298682626## + 4782516991847719023## + Roles1.$trModule + (TrNameS "T6"#) +Roles1.$tcT5 + = TyCon + 10855726709479635304## + 5574528370049939204## + Roles1.$trModule + (TrNameS "T5"#) +Roles1.$tc'K5 + = TyCon + 17986294396600628264## + 15784122741796850983## + Roles1.$trModule + (TrNameS "'K5"#) +Roles1.$tcT4 + = TyCon + 5809060867006837344## + 8795972313583150301## + Roles1.$trModule + (TrNameS "T4"#) +Roles1.$tcT3 + = TyCon + 17827258502042208248## + 10404219359416482652## + Roles1.$trModule + (TrNameS "T3"#) +Roles1.$tcT2 + = TyCon + 14324923875690440398## + 17626224477681351106## + Roles1.$trModule + (TrNameS "T2"#) +Roles1.$tc'K2 + = TyCon + 17795591238510508397## + 10155757471958311507## + Roles1.$trModule + (TrNameS "'K2"#) +Roles1.$tcT1 + = TyCon + 12633763300352597178## + 11103726621424210926## + Roles1.$trModule + (TrNameS "T1"#) +Roles1.$tc'K1 + = TyCon + 1949157551035372857## + 3576433963139282451## + Roles1.$trModule + (TrNameS "'K1"#) +Roles1.$trModule = Module (TrNameS "main"#) (TrNameS "Roles1"#) diff --git a/testsuite/tests/roles/should_compile/Roles13.stderr b/testsuite/tests/roles/should_compile/Roles13.stderr index 5ecdd16e10..4b7b2cb18d 100644 --- a/testsuite/tests/roles/should_compile/Roles13.stderr +++ b/testsuite/tests/roles/should_compile/Roles13.stderr @@ -1,17 +1,62 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 5, types: 9, coercions: 5} +Result size of Tidy Core = {terms: 42, types: 18, coercions: 5} + +-- RHS size: {terms: 2, types: 0, coercions: 0} +a :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a = TrNameS "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +a1 :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a1 = TrNameS "Roles13"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +Roles13.$trModule :: Module +[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType] +Roles13.$trModule = Module a a1 + +-- RHS size: {terms: 2, types: 0, coercions: 0} +a2 :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a2 = TrNameS "Age"# + +-- RHS size: {terms: 5, types: 0, coercions: 0} +Roles13.$tcAge :: TyCon +[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType] +Roles13.$tcAge = TyCon 0## 0## Roles13.$trModule a2 + +-- RHS size: {terms: 2, types: 0, coercions: 0} +a3 :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a3 = TrNameS "'MkWrap"# + +-- RHS size: {terms: 5, types: 0, coercions: 0} +Roles13.$tc'MkWrap :: TyCon +[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType] +Roles13.$tc'MkWrap = TyCon 0## 0## Roles13.$trModule a3 + +-- RHS size: {terms: 2, types: 0, coercions: 0} +a4 :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a4 = TrNameS "Wrap"# + +-- RHS size: {terms: 5, types: 0, coercions: 0} +Roles13.$tcWrap :: TyCon +[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType] +Roles13.$tcWrap = TyCon 0## 0## Roles13.$trModule a4 -- RHS size: {terms: 2, types: 2, coercions: 0} -a :: Wrap Age -> Wrap Age +a5 :: Wrap Age -> Wrap Age [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType] -a = \ (ds :: Wrap Age) -> ds +a5 = \ (ds :: Wrap Age) -> ds -- RHS size: {terms: 1, types: 0, coercions: 5} convert :: Wrap Age -> Int [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType] convert = - a + a5 `cast` (<Wrap Age>_R -> Roles13.NTCo:Wrap[0] Roles13.NTCo:Age[0] :: (Wrap Age -> Wrap Age) ~R# (Wrap Age -> Int)) diff --git a/testsuite/tests/roles/should_compile/Roles14.stderr b/testsuite/tests/roles/should_compile/Roles14.stderr index bb61133ce0..20c0bfe7a4 100644 --- a/testsuite/tests/roles/should_compile/Roles14.stderr +++ b/testsuite/tests/roles/should_compile/Roles14.stderr @@ -11,4 +11,11 @@ Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0, integer-gmp-1.0.0.0] ==================== Typechecker ==================== +Roles12.$tcC2 + = TyCon + 4006088231579841122## + 4783761708993822739## + Roles12.$trModule + (TrNameS "C2"#) +Roles12.$trModule = Module (TrNameS "main"#) (TrNameS "Roles12"#) diff --git a/testsuite/tests/roles/should_compile/Roles2.stderr b/testsuite/tests/roles/should_compile/Roles2.stderr index d07314379f..35895a8ae4 100644 --- a/testsuite/tests/roles/should_compile/Roles2.stderr +++ b/testsuite/tests/roles/should_compile/Roles2.stderr @@ -9,4 +9,17 @@ Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0, integer-gmp-1.0.0.0] ==================== Typechecker ==================== +Roles2.$tcT2 + = TyCon + 5934726586329293381## + 1923031187495159753## + Roles2.$trModule + (TrNameS "T2"#) +Roles2.$tcT1 + = TyCon + 13879106829711353992## + 15151456821588362072## + Roles2.$trModule + (TrNameS "T1"#) +Roles2.$trModule = Module (TrNameS "main"#) (TrNameS "Roles2"#) diff --git a/testsuite/tests/roles/should_compile/Roles3.stderr b/testsuite/tests/roles/should_compile/Roles3.stderr index 6f25b63691..483b349907 100644 --- a/testsuite/tests/roles/should_compile/Roles3.stderr +++ b/testsuite/tests/roles/should_compile/Roles3.stderr @@ -26,4 +26,29 @@ Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0, integer-gmp-1.0.0.0] ==================== Typechecker ==================== +Roles3.$tcC4 + = TyCon + 12861862461396457184## + 6389612623460961504## + Roles3.$trModule + (TrNameS "C4"#) +Roles3.$tcC3 + = TyCon + 5998139369941479154## + 6816352641934636458## + Roles3.$trModule + (TrNameS "C3"#) +Roles3.$tcC2 + = TyCon + 8833962732139387711## + 7891126688522429937## + Roles3.$trModule + (TrNameS "C2"#) +Roles3.$tcC1 + = TyCon + 16242970448469140073## + 10229725431456576413## + Roles3.$trModule + (TrNameS "C1"#) +Roles3.$trModule = Module (TrNameS "main"#) (TrNameS "Roles3"#) diff --git a/testsuite/tests/roles/should_compile/Roles4.stderr b/testsuite/tests/roles/should_compile/Roles4.stderr index 0113869e42..2c19dd29d5 100644 --- a/testsuite/tests/roles/should_compile/Roles4.stderr +++ b/testsuite/tests/roles/should_compile/Roles4.stderr @@ -15,4 +15,17 @@ Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0, integer-gmp-1.0.0.0] ==================== Typechecker ==================== +Roles4.$tcC3 + = TyCon + 16502190608089501863## + 13971441568961069854## + Roles4.$trModule + (TrNameS "C3"#) +Roles4.$tcC1 + = TyCon + 11951908835899020229## + 6518430686554778113## + Roles4.$trModule + (TrNameS "C1"#) +Roles4.$trModule = Module (TrNameS "main"#) (TrNameS "Roles4"#) diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr index 87c3c0058e..c62d9c43dc 100644 --- a/testsuite/tests/roles/should_compile/T8958.stderr +++ b/testsuite/tests/roles/should_compile/T8958.stderr @@ -1,5 +1,5 @@ -T8958.hs:1:31: Warning: +T8958.hs:1:31: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. TYPE SIGNATURES TYPE CONSTRUCTORS @@ -20,6 +20,13 @@ Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0, integer-gmp-1.0.0.0] ==================== Typechecker ==================== +T8958.$tcMap = TyCon 0## 0## T8958.$trModule (TrNameS "Map"#) +T8958.$tc'MkMap = TyCon 0## 0## T8958.$trModule (TrNameS "'MkMap"#) +T8958.$tcRepresentational + = TyCon 0## 0## T8958.$trModule (TrNameS "Representational"#) +T8958.$tcNominal + = TyCon 0## 0## T8958.$trModule (TrNameS "Nominal"#) +T8958.$trModule = Module (TrNameS "main"#) (TrNameS "T8958"#) AbsBinds [a] [] {Exports: [T8958.$fRepresentationala <= $dRepresentational <>] diff --git a/testsuite/tests/simplCore/should_compile/T3234.stderr b/testsuite/tests/simplCore/should_compile/T3234.stderr index c3591d02fe..d317991925 100644 --- a/testsuite/tests/simplCore/should_compile/T3234.stderr +++ b/testsuite/tests/simplCore/should_compile/T3234.stderr @@ -10,7 +10,7 @@ ==================== Grand total simplifier statistics ==================== -Total ticks: 45 +Total ticks: 46 14 PreInlineUnconditionally 1 n @@ -37,7 +37,7 @@ Total ticks: 45 1 foldr/single 1 unpack 1 unpack-list -1 LetFloatFromLet 1 +2 LetFloatFromLet 2 22 BetaReduction 1 a 1 b diff --git a/testsuite/tests/simplCore/should_compile/T3717.stderr b/testsuite/tests/simplCore/should_compile/T3717.stderr index 374533605e..f7fa084ef0 100644 --- a/testsuite/tests/simplCore/should_compile/T3717.stderr +++ b/testsuite/tests/simplCore/should_compile/T3717.stderr @@ -1,6 +1,33 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 22, types: 10, coercions: 0} +Result size of Tidy Core = {terms: 32, types: 13, coercions: 0} + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T3717.$trModule2 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] +T3717.$trModule2 = TrNameS "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T3717.$trModule1 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}] +T3717.$trModule1 = TrNameS "T3717"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +T3717.$trModule :: Module +[GblId[ReflectionId], + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] +T3717.$trModule = Module T3717.$trModule2 T3717.$trModule1 Rec { -- RHS size: {terms: 10, types: 2, coercions: 0} diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout index e74fa39cb5..1ef8c79002 100644 --- a/testsuite/tests/simplCore/should_compile/T3772.stdout +++ b/testsuite/tests/simplCore/should_compile/T3772.stdout @@ -1,6 +1,6 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 26, types: 11, coercions: 0} +Result size of Tidy Core = {terms: 36, types: 14, coercions: 0} Rec { -- RHS size: {terms: 10, types: 2, coercions: 0} @@ -26,5 +26,32 @@ foo = } } +-- RHS size: {terms: 2, types: 0, coercions: 0} +T3772.$trModule1 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}] +T3772.$trModule1 = TrNameS "T3772"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T3772.$trModule2 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] +T3772.$trModule2 = TrNameS "main"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +T3772.$trModule :: Module +[GblId[ReflectionId], + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] +T3772.$trModule = Module T3772.$trModule2 T3772.$trModule1 + diff --git a/testsuite/tests/simplCore/should_compile/T4908.stderr b/testsuite/tests/simplCore/should_compile/T4908.stderr index 6ad89470bb..334935ddd4 100644 --- a/testsuite/tests/simplCore/should_compile/T4908.stderr +++ b/testsuite/tests/simplCore/should_compile/T4908.stderr @@ -1,6 +1,33 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 54, types: 38, coercions: 0} +Result size of Tidy Core = {terms: 64, types: 41, coercions: 0} + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T4908.$trModule2 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] +T4908.$trModule2 = TrNameS "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T4908.$trModule1 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}] +T4908.$trModule1 = TrNameS "T4908"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +T4908.$trModule :: Module +[GblId[ReflectionId], + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] +T4908.$trModule = Module T4908.$trModule2 T4908.$trModule1 Rec { -- RHS size: {terms: 19, types: 5, coercions: 0} diff --git a/testsuite/tests/simplCore/should_compile/T4930.stderr b/testsuite/tests/simplCore/should_compile/T4930.stderr index 552c8a8ddc..9f71161d14 100644 --- a/testsuite/tests/simplCore/should_compile/T4930.stderr +++ b/testsuite/tests/simplCore/should_compile/T4930.stderr @@ -1,6 +1,33 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 35, types: 14, coercions: 0} +Result size of Tidy Core = {terms: 45, types: 17, coercions: 0} + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T4930.$trModule2 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] +T4930.$trModule2 = TrNameS "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T4930.$trModule1 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}] +T4930.$trModule1 = TrNameS "T4930"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +T4930.$trModule :: Module +[GblId[ReflectionId], + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] +T4930.$trModule = Module T4930.$trModule2 T4930.$trModule1 Rec { -- RHS size: {terms: 23, types: 6, coercions: 0} diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr index f7979075ac..1cd13301f9 100644 --- a/testsuite/tests/simplCore/should_compile/T7360.stderr +++ b/testsuite/tests/simplCore/should_compile/T7360.stderr @@ -1,6 +1,6 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 36, types: 29, coercions: 0} +Result size of Tidy Core = {terms: 55, types: 34, coercions: 0} -- RHS size: {terms: 6, types: 3, coercions: 0} T7360.$WFoo3 [InlPrag=INLINE] :: Int -> Foo @@ -17,6 +17,51 @@ T7360.$WFoo3 = \ (dt [Occ=Once!] :: Int) -> case dt of _ [Occ=Dead] { I# dt [Occ=Once] -> T7360.Foo3 dt } +-- RHS size: {terms: 2, types: 0, coercions: 0} +T7360.$trModule2 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] +T7360.$trModule2 = TrNameS "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T7360.$trModule1 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}] +T7360.$trModule1 = TrNameS "T7360"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +T7360.$trModule :: Module +[GblId[ReflectionId], + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] +T7360.$trModule = Module T7360.$trModule2 T7360.$trModule1 + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T7360.$tcFoo1 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] +T7360.$tcFoo1 = TrNameS "Foo"# + +-- RHS size: {terms: 5, types: 0, coercions: 0} +T7360.$tcFoo :: TyCon +[GblId[ReflectionId], + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 50}] +T7360.$tcFoo = TyCon 0## 0## T7360.$trModule T7360.$tcFoo1 + -- RHS size: {terms: 5, types: 2, coercions: 0} fun1 [InlPrag=NOINLINE] :: Foo -> () [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>] diff --git a/testsuite/tests/simplCore/should_compile/T8274.stdout b/testsuite/tests/simplCore/should_compile/T8274.stdout index 35f2412bc4..6c0e36f8f9 100644 --- a/testsuite/tests/simplCore/should_compile/T8274.stdout +++ b/testsuite/tests/simplCore/should_compile/T8274.stdout @@ -1,2 +1,10 @@ +T8274.$trModule2 = TrNameS "main"# +T8274.$trModule1 = TrNameS "T8274"# +T8274.$tcP1 = TrNameS "P"# + 11095028091707994303## + 9476557054198009608## +T8274.$tcN1 = TrNameS "N"# + 7479687563082171902## + 17616649989360543185## p = T8274.Positives 42# 4.23# 4.23## '4'# 4## n = T8274.Negatives -4# -4.0# -4.0## diff --git a/testsuite/tests/simplCore/should_compile/T9400.stderr b/testsuite/tests/simplCore/should_compile/T9400.stderr index 5216d1ed5f..3bc95e42cc 100644 --- a/testsuite/tests/simplCore/should_compile/T9400.stderr +++ b/testsuite/tests/simplCore/should_compile/T9400.stderr @@ -1,6 +1,21 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 23, types: 16, coercions: 0} +Result size of Tidy Core = {terms: 33, types: 19, coercions: 0} + +-- RHS size: {terms: 2, types: 0, coercions: 0} +a :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a = TrNameS "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +a1 :: TrName +[GblId, Caf=NoCafRefs, Str=DmdType] +a1 = TrNameS "T9400"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +T9400.$trModule :: Module +[GblId[ReflectionId], Caf=NoCafRefs, Str=DmdType] +T9400.$trModule = Module a a1 -- RHS size: {terms: 22, types: 14, coercions: 0} main :: IO () diff --git a/testsuite/tests/simplCore/should_compile/rule2.stderr b/testsuite/tests/simplCore/should_compile/rule2.stderr index 082f9aa134..da97b8859c 100644 --- a/testsuite/tests/simplCore/should_compile/rule2.stderr +++ b/testsuite/tests/simplCore/should_compile/rule2.stderr @@ -10,13 +10,14 @@ ==================== Grand total simplifier statistics ==================== -Total ticks: 12 +Total ticks: 13 2 PreInlineUnconditionally 1 f 1 lvl 1 UnfoldingDone 1 Roman.bar 1 RuleFired 1 foo/bar +1 LetFloatFromLet 1 1 EtaReduction 1 ds 7 BetaReduction 1 f diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr index 392d4fba73..7ae0e9c920 100644 --- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr +++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr @@ -1,6 +1,33 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 162, types: 61, coercions: 0} +Result size of Tidy Core = {terms: 172, types: 64, coercions: 0} + +-- RHS size: {terms: 2, types: 0, coercions: 0} +Roman.$trModule2 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] +Roman.$trModule2 = TrNameS "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0} +Roman.$trModule1 :: TrName +[GblId, + Caf=NoCafRefs, + Str=DmdType m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}] +Roman.$trModule1 = TrNameS "Roman"# + +-- RHS size: {terms: 3, types: 0, coercions: 0} +Roman.$trModule :: Module +[GblId[ReflectionId], + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] +Roman.$trModule = Module Roman.$trModule2 Roman.$trModule1 -- RHS size: {terms: 2, types: 1, coercions: 0} Roman.foo3 :: Int diff --git a/testsuite/tests/stranal/should_compile/T10694.stdout b/testsuite/tests/stranal/should_compile/T10694.stdout index 2797ce7407..64d5f7a1aa 100644 --- a/testsuite/tests/stranal/should_compile/T10694.stdout +++ b/testsuite/tests/stranal/should_compile/T10694.stdout @@ -1,2 +1,5 @@ + Str=DmdType m1, + Str=DmdType m1, + Str=DmdType m, [GblId, Arity=2, Str=DmdType <L,U(U)><L,U(U)>m] Str=DmdType <L,U(U)><L,U(U)>, diff --git a/testsuite/tests/stranal/sigs/BottomFromInnerLambda.stderr b/testsuite/tests/stranal/sigs/BottomFromInnerLambda.stderr index e8ae690147..4bc1e3f379 100644 --- a/testsuite/tests/stranal/sigs/BottomFromInnerLambda.stderr +++ b/testsuite/tests/stranal/sigs/BottomFromInnerLambda.stderr @@ -1,5 +1,6 @@ ==================== Strictness signatures ==================== +BottomFromInnerLambda.$trModule: m BottomFromInnerLambda.expensive: <S(S),1*U(U)>m BottomFromInnerLambda.f: <S(S),1*U(U)> diff --git a/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr b/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr index 7fb1a55223..aa7a2ef8b6 100644 --- a/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr +++ b/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr @@ -1,5 +1,7 @@ ==================== Strictness signatures ==================== +DmdAnalGADTs.$tcD: m +DmdAnalGADTs.$trModule: m DmdAnalGADTs.diverges: b DmdAnalGADTs.f: <S,1*U> DmdAnalGADTs.f': <S,1*U>m diff --git a/testsuite/tests/stranal/sigs/HyperStrUse.stderr b/testsuite/tests/stranal/sigs/HyperStrUse.stderr index 1a0ff337c1..f04a2118fd 100644 --- a/testsuite/tests/stranal/sigs/HyperStrUse.stderr +++ b/testsuite/tests/stranal/sigs/HyperStrUse.stderr @@ -1,5 +1,6 @@ ==================== Strictness signatures ==================== +HyperStrUse.$trModule: m HyperStrUse.f: <S(SL),1*U(1*U(U),A)><S,1*U>m diff --git a/testsuite/tests/stranal/sigs/StrAnalExample.stderr b/testsuite/tests/stranal/sigs/StrAnalExample.stderr index dbe4770080..bd82226bee 100644 --- a/testsuite/tests/stranal/sigs/StrAnalExample.stderr +++ b/testsuite/tests/stranal/sigs/StrAnalExample.stderr @@ -1,5 +1,6 @@ ==================== Strictness signatures ==================== +StrAnalExample.$trModule: m StrAnalExample.foo: <S,1*U> diff --git a/testsuite/tests/stranal/sigs/T8569.stderr b/testsuite/tests/stranal/sigs/T8569.stderr index d33935ee14..3013d769fb 100644 --- a/testsuite/tests/stranal/sigs/T8569.stderr +++ b/testsuite/tests/stranal/sigs/T8569.stderr @@ -1,5 +1,7 @@ ==================== Strictness signatures ==================== +T8569.$tcRep: m +T8569.$trModule: m T8569.addUp: <S,1*U><L,U> diff --git a/testsuite/tests/stranal/sigs/T8598.stderr b/testsuite/tests/stranal/sigs/T8598.stderr index 8de5d31a01..28d5dd0c7d 100644 --- a/testsuite/tests/stranal/sigs/T8598.stderr +++ b/testsuite/tests/stranal/sigs/T8598.stderr @@ -1,5 +1,6 @@ ==================== Strictness signatures ==================== +T8598.$trModule: m T8598.fun: <S(S),1*U(U)>m diff --git a/testsuite/tests/stranal/sigs/UnsatFun.stderr b/testsuite/tests/stranal/sigs/UnsatFun.stderr index 6e6402bacc..5f2d27ff20 100644 --- a/testsuite/tests/stranal/sigs/UnsatFun.stderr +++ b/testsuite/tests/stranal/sigs/UnsatFun.stderr @@ -1,5 +1,6 @@ ==================== Strictness signatures ==================== +UnsatFun.$trModule: m UnsatFun.f: <B,1*U(U)><B,A>b UnsatFun.g: <B,1*U(U)>b UnsatFun.g': <L,1*U(U)> diff --git a/testsuite/tests/th/TH_Roles2.stderr b/testsuite/tests/th/TH_Roles2.stderr index 8f078ba901..5ca909f7ab 100644 --- a/testsuite/tests/th/TH_Roles2.stderr +++ b/testsuite/tests/th/TH_Roles2.stderr @@ -9,4 +9,12 @@ Dependent packages: [array-0.5.1.0, base-4.8.2.0, deepseq-1.4.1.1, pretty-1.1.2.0, template-haskell-2.11.0.0] ==================== Typechecker ==================== +TH_Roles2.$tcT + = TyCon + 6325001754388382679## + 4656387726417942748## + TH_Roles2.$trModule + (TrNameS "T"#) +TH_Roles2.$trModule + = Module (TrNameS "main"#) (TrNameS "TH_Roles2"#) diff --git a/testsuite/tests/typecheck/should_compile/holes2.stderr b/testsuite/tests/typecheck/should_compile/holes2.stderr index ee3d627438..63891fa273 100644 --- a/testsuite/tests/typecheck/should_compile/holes2.stderr +++ b/testsuite/tests/typecheck/should_compile/holes2.stderr @@ -4,10 +4,10 @@ holes2.hs:3:5: warning: prevents the constraint ‘(Show a0)’ from being solved. Probable fix: use a type annotation to specify what ‘a0’ should be. These potential instances exist: + instance Show Module -- Defined in ‘GHC.Show’ instance Show Ordering -- Defined in ‘GHC.Show’ - instance Show Integer -- Defined in ‘GHC.Show’ - instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’ - ...plus 22 others + instance Show TrName -- Defined in ‘GHC.Show’ + ...plus 25 others (use -fprint-potential-instances to see them all) In the expression: show _ In an equation for ‘f’: f = show _ diff --git a/testsuite/tests/typecheck/should_fail/T5095.stderr b/testsuite/tests/typecheck/should_fail/T5095.stderr index 46667fb8f4..a854b7ea75 100644 --- a/testsuite/tests/typecheck/should_fail/T5095.stderr +++ b/testsuite/tests/typecheck/should_fail/T5095.stderr @@ -6,7 +6,7 @@ T5095.hs:9:11: error: instance (Eq a, Eq b) => Eq (Either a b) -- Defined in ‘Data.Either’ instance Eq All -- Defined in ‘Data.Monoid’ - ...plus 35 others + ...plus 36 others ...plus one instance involving out-of-scope types (use -fprint-potential-instances to see them all) (The choice depends on the instantiation of ‘a’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr index 65b157332d..68d7283244 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr @@ -8,10 +8,10 @@ tcfail072.hs:23:13: error: The type variable ‘p0’ is ambiguous These potential instances exist: instance Ord Ordering -- Defined in ‘GHC.Classes’ + instance Ord TyCon -- Defined in ‘GHC.Classes’ instance Ord Integer -- Defined in ‘integer-gmp-1.0.0.0:GHC.Integer.Type’ - instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’ - ...plus 22 others + ...plus 23 others ...plus one instance involving out-of-scope types (use -fprint-potential-instances to see them all) In the expression: g A diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr index f61320f4c1..32f73422af 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr @@ -7,11 +7,10 @@ tcfail133.hs:68:7: error: prevents the constraint ‘(Show r0)’ from being solved. Probable fix: use a type annotation to specify what ‘r0’ should be. These potential instances exist: + instance Show Module -- Defined in ‘GHC.Show’ instance Show Ordering -- Defined in ‘GHC.Show’ - instance Show Integer -- Defined in ‘GHC.Show’ - instance (Show a, Show b, Number a, Digit b) => Show (a :@ b) - -- Defined at tcfail133.hs:11:54 - ...plus 25 others + instance Show TrName -- Defined in ‘GHC.Show’ + ...plus 28 others (use -fprint-potential-instances to see them all) In the expression: show In the expression: show $ add (One :@ Zero) (One :@ One) |