diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-01-10 22:23:27 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-01-10 22:23:27 -0500 |
commit | 82ce5f38defd4ccce8e813731978891df499496a (patch) | |
tree | 34e2041f4e91f0186d20286e8ea5c2df3e297a1c | |
parent | 7d764215a9a17f4dc26784b66c4c2508c9d19e33 (diff) | |
download | haskell-foldr-to-foldl.tar.gz |
testsuitefoldr-to-foldl
31 files changed, 361 insertions, 361 deletions
diff --git a/testsuite/tests/boxy/Base1.stderr b/testsuite/tests/boxy/Base1.stderr index 75a8e0cfe2..f4cfe65c74 100644 --- a/testsuite/tests/boxy/Base1.stderr +++ b/testsuite/tests/boxy/Base1.stderr @@ -1,15 +1,15 @@ Base1.hs:20:13: error: - • Couldn't match type ‘a0 -> a0’ with ‘forall a. a -> a’ + • Couldn't match type ‘a2 -> a2’ with ‘forall a. a -> a’ Expected type: MEither Sid b - Actual type: MEither (a0 -> a0) b + Actual type: MEither (a2 -> a2) b • In the expression: MLeft fid In an equation for ‘test1’: test1 fid = MLeft fid Base1.hs:25:39: error: • Couldn't match type ‘a1 -> a1’ with ‘forall a. a -> a’ Expected type: Maybe (Sid, Sid) - Actual type: Maybe (a1 -> a1, a2 -> a2) + Actual type: Maybe (a1 -> a1, a0 -> a0) • In the expression: Just (x, y) In a case alternative: MRight y -> Just (x, y) In the expression: diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr index ff1047db84..0acd3fae1f 100644 --- a/testsuite/tests/deSugar/should_compile/T2431.stderr +++ b/testsuite/tests/deSugar/should_compile/T2431.stderr @@ -16,11 +16,6 @@ T2431.$WRefl = \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: (a :: *) GHC.Prim.~# (a :: *)) --- RHS size: {terms: 4, types: 8, coercions: 0} -absurd :: forall a. (Int :~: Bool) -> a -[GblId, Arity=1, Caf=NoCafRefs, Str=<L,U>x] -absurd = \ (@ a) (x :: Int :~: Bool) -> case x of { } - -- RHS size: {terms: 2, types: 0, coercions: 0} $trModule1 :: GHC.Types.TrName [GblId, Caf=NoCafRefs] @@ -37,34 +32,39 @@ T2431.$trModule :: GHC.Types.Module T2431.$trModule = GHC.Types.Module $trModule1 $trModule2 -- RHS size: {terms: 2, types: 0, coercions: 0} -$tc'Refl1 :: GHC.Types.TrName +$tc:~:1 :: GHC.Types.TrName [GblId, Caf=NoCafRefs] -$tc'Refl1 = GHC.Types.TrNameS "'Refl"# +$tc:~:1 = GHC.Types.TrNameS ":~:"# -- RHS size: {terms: 5, types: 0, coercions: 0} -T2431.$tc'Refl :: GHC.Types.TyCon +T2431.$tc:~: :: GHC.Types.TyCon [GblId, Caf=NoCafRefs] -T2431.$tc'Refl = +T2431.$tc:~: = GHC.Types.TyCon - 15026191172322750497## - 3898273167927206410## + 9759653149176674453## + 12942818337407067047## T2431.$trModule - $tc'Refl1 + $tc:~:1 -- RHS size: {terms: 2, types: 0, coercions: 0} -$tc:~:1 :: GHC.Types.TrName +$tc'Refl1 :: GHC.Types.TrName [GblId, Caf=NoCafRefs] -$tc:~:1 = GHC.Types.TrNameS ":~:"# +$tc'Refl1 = GHC.Types.TrNameS "'Refl"# -- RHS size: {terms: 5, types: 0, coercions: 0} -T2431.$tc:~: :: GHC.Types.TyCon +T2431.$tc'Refl :: GHC.Types.TyCon [GblId, Caf=NoCafRefs] -T2431.$tc:~: = +T2431.$tc'Refl = GHC.Types.TyCon - 9759653149176674453## - 12942818337407067047## + 15026191172322750497## + 3898273167927206410## T2431.$trModule - $tc:~:1 + $tc'Refl1 + +-- RHS size: {terms: 4, types: 8, coercions: 0} +absurd :: forall a. (Int :~: Bool) -> a +[GblId, Arity=1, Caf=NoCafRefs, Str=<L,U>x] +absurd = \ (@ a) (x :: Int :~: Bool) -> case x of { } diff --git a/testsuite/tests/driver/T2182.stderr b/testsuite/tests/driver/T2182.stderr index 770135a338..6b019b7d08 100644 --- a/testsuite/tests/driver/T2182.stderr +++ b/testsuite/tests/driver/T2182.stderr @@ -1,24 +1,24 @@ T2182.hs:5:5: error: - • No instance for (Show (p1 -> p1)) arising from a use of ‘show’ + • No instance for (Show (p0 -> p0)) arising from a use of ‘show’ (maybe you haven't applied a function to enough arguments?) • In the expression: show (\ x -> x) In an equation for ‘y’: y = show (\ x -> x) T2182.hs:6:5: error: - • No instance for (Eq (p0 -> p0)) arising from a use of ‘==’ + • No instance for (Eq (p1 -> p1)) arising from a use of ‘==’ (maybe you haven't applied a function to enough arguments?) • In the expression: (\ x -> x) == (\ y -> y) In an equation for ‘z’: z = (\ x -> x) == (\ y -> y) T2182.hs:5:5: error: - • No instance for (Show (p1 -> p1)) arising from a use of ‘show’ + • No instance for (Show (p0 -> p0)) arising from a use of ‘show’ (maybe you haven't applied a function to enough arguments?) • In the expression: show (\ x -> x) In an equation for ‘y’: y = show (\ x -> x) T2182.hs:6:5: error: - • No instance for (Eq (p0 -> p0)) arising from a use of ‘==’ + • No instance for (Eq (p1 -> p1)) arising from a use of ‘==’ (maybe you haven't applied a function to enough arguments?) • In the expression: (\ x -> x) == (\ y -> y) In an equation for ‘z’: z = (\ x -> x) == (\ y -> y) diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr index b9764c3b7b..5ed298ddf1 100644 --- a/testsuite/tests/ghci/scripts/Defer02.stderr +++ b/testsuite/tests/ghci/scripts/Defer02.stderr @@ -66,14 +66,14 @@ Defer01.hs:39:17: warning: [-Wdeferred-type-errors (in -Wdefault)] i :: a -> () (bound at Defer01.hs:39:1) Defer01.hs:43:5: warning: [-Wdeferred-type-errors (in -Wdefault)] - • No instance for (MyClass a1) arising from a use of ‘myOp’ + • No instance for (MyClass a0) arising from a use of ‘myOp’ • In the expression: myOp 23 In an equation for ‘j’: j = myOp 23 Defer01.hs:43:10: warning: [-Wdeferred-type-errors (in -Wdefault)] - • Ambiguous type variable ‘a1’ arising from the literal ‘23’ - prevents the constraint ‘(Num a1)’ from being solved. - Probable fix: use a type annotation to specify what ‘a1’ should be. + • Ambiguous type variable ‘a0’ arising from the literal ‘23’ + prevents the constraint ‘(Num a0)’ from being solved. + Probable fix: use a type annotation to specify what ‘a0’ should be. These potential instances exist: instance Num Integer -- Defined in ‘GHC.Num’ instance Num Double -- Defined in ‘GHC.Float’ @@ -89,7 +89,7 @@ Defer01.hs:47:1: warning: [-Woverlapping-patterns (in -Wdefault)] In an equation for ‘k’: k x = ... Defer01.hs:50:5: warning: [-Wdeferred-type-errors (in -Wdefault)] - • Couldn't match expected type ‘IO a0’ + • Couldn't match expected type ‘IO a1’ with actual type ‘Char -> IO ()’ • Probable cause: ‘putChar’ is applied to too few arguments In the first argument of ‘(>>)’, namely ‘putChar’ @@ -158,7 +158,7 @@ Defer01.hs:50:5: warning: [-Wdeferred-type-errors (in -Wdefault)] i :: a -> () (bound at Defer01.hs:39:1) (deferred type error) *** Exception: Defer01.hs:43:5: error: - • No instance for (MyClass a1) arising from a use of ‘myOp’ + • No instance for (MyClass a0) arising from a use of ‘myOp’ • In the expression: myOp 23 In an equation for ‘j’: j = myOp 23 (deferred type error) @@ -169,7 +169,7 @@ Defer01.hs:50:5: warning: [-Wdeferred-type-errors (in -Wdefault)] In the expression: print (k 2) In an equation for ‘it’: it = print (k 2) *** Exception: Defer01.hs:50:5: error: - • Couldn't match expected type ‘IO a0’ + • Couldn't match expected type ‘IO a1’ with actual type ‘Char -> IO ()’ • Probable cause: ‘putChar’ is applied to too few arguments In the first argument of ‘(>>)’, namely ‘putChar’ diff --git a/testsuite/tests/indexed-types/should_fail/T2544.stderr b/testsuite/tests/indexed-types/should_fail/T2544.stderr index b943db2087..87e69f67be 100644 --- a/testsuite/tests/indexed-types/should_fail/T2544.stderr +++ b/testsuite/tests/indexed-types/should_fail/T2544.stderr @@ -1,10 +1,10 @@ T2544.hs:17:12: error: - • Couldn't match type ‘IxMap r’ with ‘IxMap i1’ + • Couldn't match type ‘IxMap r’ with ‘IxMap i0’ Expected type: IxMap (l :|: r) [Int] - Actual type: BiApp (IxMap l) (IxMap i1) [Int] + Actual type: BiApp (IxMap l) (IxMap i0) [Int] NB: ‘IxMap’ is a type function, and may not be injective - The type variable ‘i1’ is ambiguous + The type variable ‘i0’ is ambiguous • In the expression: BiApp empty empty In an equation for ‘empty’: empty = BiApp empty empty In the instance declaration for ‘Ix (l :|: r)’ @@ -12,11 +12,11 @@ T2544.hs:17:12: error: empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:17:4) T2544.hs:17:18: error: - • Couldn't match type ‘IxMap i0’ with ‘IxMap l’ + • Couldn't match type ‘IxMap i1’ with ‘IxMap l’ Expected type: IxMap l [Int] - Actual type: IxMap i0 [Int] + Actual type: IxMap i1 [Int] NB: ‘IxMap’ is a type function, and may not be injective - The type variable ‘i0’ is ambiguous + The type variable ‘i1’ is ambiguous • In the first argument of ‘BiApp’, namely ‘empty’ In the expression: BiApp empty empty In an equation for ‘empty’: empty = BiApp empty empty diff --git a/testsuite/tests/indexed-types/should_fail/T2693.stderr b/testsuite/tests/indexed-types/should_fail/T2693.stderr index f9485d1d42..9c5cf3bb4b 100644 --- a/testsuite/tests/indexed-types/should_fail/T2693.stderr +++ b/testsuite/tests/indexed-types/should_fail/T2693.stderr @@ -1,35 +1,35 @@ T2693.hs:12:15: error: - • Couldn't match expected type ‘(a8, b1)’ with actual type ‘TFn a6’ - The type variables ‘a6’, ‘a8’, ‘b1’ are ambiguous + • Couldn't match expected type ‘(a4, b1)’ with actual type ‘TFn a3’ + The type variables ‘a3’, ‘a4’, ‘b1’ are ambiguous • In the first argument of ‘fst’, namely ‘x’ In the first argument of ‘(+)’, namely ‘fst x’ In the expression: fst x + fst x - • Relevant bindings include n :: a8 (bound at T2693.hs:12:7) + • Relevant bindings include n :: a4 (bound at T2693.hs:12:7) T2693.hs:12:23: error: - • Couldn't match expected type ‘(a8, b2)’ with actual type ‘TFn a7’ - The type variables ‘a7’, ‘a8’, ‘b2’ are ambiguous + • Couldn't match expected type ‘(a4, b0)’ with actual type ‘TFn a2’ + The type variables ‘a2’, ‘a4’, ‘b0’ are ambiguous • In the first argument of ‘fst’, namely ‘x’ In the second argument of ‘(+)’, namely ‘fst x’ In the expression: fst x + fst x - • Relevant bindings include n :: a8 (bound at T2693.hs:12:7) + • Relevant bindings include n :: a4 (bound at T2693.hs:12:7) T2693.hs:19:15: error: - • Couldn't match expected type ‘(a5, b0)’ with actual type ‘TFn a2’ - The type variables ‘a2’, ‘a5’, ‘b0’ are ambiguous + • Couldn't match expected type ‘(a8, b2)’ with actual type ‘TFn a7’ + The type variables ‘a7’, ‘a8’, ‘b2’ are ambiguous • In the first argument of ‘fst’, namely ‘x’ In the first argument of ‘(+)’, namely ‘fst x’ In the expression: fst x + snd x - • Relevant bindings include n :: a5 (bound at T2693.hs:19:7) + • Relevant bindings include n :: a8 (bound at T2693.hs:19:7) T2693.hs:19:23: error: - • Couldn't match expected type ‘(a4, a5)’ with actual type ‘TFn a3’ - The type variables ‘a3’, ‘a4’, ‘a5’ are ambiguous + • Couldn't match expected type ‘(a6, a8)’ with actual type ‘TFn a5’ + The type variables ‘a5’, ‘a6’, ‘a8’ are ambiguous • In the first argument of ‘snd’, namely ‘x’ In the second argument of ‘(+)’, namely ‘snd x’ In the expression: fst x + snd x - • Relevant bindings include n :: a5 (bound at T2693.hs:19:7) + • Relevant bindings include n :: a8 (bound at T2693.hs:19:7) T2693.hs:29:20: error: • Couldn't match type ‘TFn a0’ with ‘PVR a1’ diff --git a/testsuite/tests/indexed-types/should_fail/T4099.stderr b/testsuite/tests/indexed-types/should_fail/T4099.stderr index a0ddc964ff..1a8e7ac214 100644 --- a/testsuite/tests/indexed-types/should_fail/T4099.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4099.stderr @@ -1,8 +1,8 @@ T4099.hs:11:30: error: - • Couldn't match expected type ‘T a0’ with actual type ‘T b’ + • Couldn't match expected type ‘T a1’ with actual type ‘T b’ NB: ‘T’ is a type function, and may not be injective - The type variable ‘a0’ is ambiguous + The type variable ‘a1’ is ambiguous • In the second argument of ‘foo’, namely ‘x’ In the expression: foo (error "urk") x In an equation for ‘bar1’: bar1 a x = foo (error "urk") x @@ -12,8 +12,8 @@ T4099.hs:11:30: error: bar1 :: b -> T b -> Int (bound at T4099.hs:11:1) T4099.hs:14:30: error: - • Couldn't match expected type ‘T a1’ with actual type ‘Maybe b’ - The type variable ‘a1’ is ambiguous + • Couldn't match expected type ‘T a0’ with actual type ‘Maybe b’ + The type variable ‘a0’ is ambiguous • In the second argument of ‘foo’, namely ‘x’ In the expression: foo (error "urk") x In an equation for ‘bar2’: bar2 a x = foo (error "urk") x diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr index f938d03169..b560165207 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr @@ -1,12 +1,12 @@ overloadedlabelsfail01.hs:6:5: error: - • No instance for (IsLabel "x" t2) + • No instance for (IsLabel "x" t0) arising from the overloaded label ‘#x’ • In the expression: #x In an equation for ‘a’: a = #x overloadedlabelsfail01.hs:9:5: error: - • No instance for (IsLabel "x" (t1 -> t0)) + • No instance for (IsLabel "x" (t1 -> t2)) arising from the overloaded label ‘#x’ (maybe you haven't applied a function to enough arguments?) • In the expression: #x diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.stderr b/testsuite/tests/partial-sigs/should_fail/T10615.stderr index c17759a531..400546a2e3 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr @@ -1,32 +1,32 @@ T10615.hs:4:7: error: - • Found type wildcard ‘_’ standing for ‘a1’ - Where: ‘a1’ is an ambiguous type variable + • Found type wildcard ‘_’ standing for ‘a0’ + Where: ‘a0’ is an ambiguous type variable To use the inferred type, enable PartialTypeSignatures • In the type signature: f1 :: _ -> f T10615.hs:5:6: error: - • Couldn't match type ‘f’ with ‘b1 -> a1’ + • Couldn't match type ‘f’ with ‘b0 -> a0’ ‘f’ is a rigid type variable bound by - the inferred type of f1 :: a1 -> f at T10615.hs:5:1-10 - Expected type: a1 -> f - Actual type: a1 -> b1 -> a1 + the inferred type of f1 :: a0 -> f at T10615.hs:5:1-10 + Expected type: a0 -> f + Actual type: a0 -> b0 -> a0 • In the expression: const In an equation for ‘f1’: f1 = const - • Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1) + • Relevant bindings include f1 :: a0 -> f (bound at T10615.hs:5:1) T10615.hs:7:7: error: - • Found type wildcard ‘_’ standing for ‘a0’ - Where: ‘a0’ is an ambiguous type variable + • Found type wildcard ‘_’ standing for ‘a1’ + Where: ‘a1’ is an ambiguous type variable To use the inferred type, enable PartialTypeSignatures • In the type signature: f2 :: _ -> _f T10615.hs:8:6: error: - • Couldn't match type ‘_f’ with ‘b0 -> a0’ + • Couldn't match type ‘_f’ with ‘b1 -> a1’ ‘_f’ is a rigid type variable bound by - the inferred type of f2 :: a0 -> _f at T10615.hs:8:1-10 - Expected type: a0 -> _f - Actual type: a0 -> b0 -> a0 + the inferred type of f2 :: a1 -> _f at T10615.hs:8:1-10 + Expected type: a1 -> _f + Actual type: a1 -> b1 -> a1 • In the expression: const In an equation for ‘f2’: f2 = const - • Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1) + • Relevant bindings include f2 :: a1 -> _f (bound at T10615.hs:8:1) diff --git a/testsuite/tests/partial-sigs/should_fail/T10999.stderr b/testsuite/tests/partial-sigs/should_fail/T10999.stderr index 582cf1a70e..3b883e79e5 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10999.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10999.stderr @@ -16,10 +16,10 @@ T10999.hs:5:17: error: • In the type signature: f :: _ => () -> _ T10999.hs:8:28: error: - • Ambiguous type variable ‘b0’ arising from a use of ‘f’ - prevents the constraint ‘(Ord b0)’ from being solved. - Relevant bindings include g :: [b0] (bound at T10999.hs:8:1) - Probable fix: use a type annotation to specify what ‘b0’ should be. + • Ambiguous type variable ‘b1’ arising from a use of ‘f’ + prevents the constraint ‘(Ord b1)’ from being solved. + Relevant bindings include g :: [b1] (bound at T10999.hs:8:1) + Probable fix: use a type annotation to specify what ‘b1’ should be. These potential instances exist: instance Ord a => Ord (Set.Set a) -- Defined in ‘containers-0.5.7.1:Data.Set.Base’ diff --git a/testsuite/tests/roles/should_compile/Roles1.stderr b/testsuite/tests/roles/should_compile/Roles1.stderr index bb67a8cf26..9e8c79bbb9 100644 --- a/testsuite/tests/roles/should_compile/Roles1.stderr +++ b/testsuite/tests/roles/should_compile/Roles1.stderr @@ -25,6 +25,9 @@ Dependent packages: [base-4.10.0.0, ghc-prim-0.5.0.0, integer-gmp-1.0.0.1] ==================== Typechecker ==================== +Roles1.$trModule + = GHC.Types.Module + (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles1"#) Roles1.$tcT7 = GHC.Types.TyCon 12795488517584970699## @@ -109,7 +112,4 @@ Roles1.$tc'K1 3576433963139282451## Roles1.$trModule (GHC.Types.TrNameS "'K1"#) -Roles1.$trModule - = GHC.Types.Module - (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles1"#) diff --git a/testsuite/tests/roles/should_compile/Roles13.stderr b/testsuite/tests/roles/should_compile/Roles13.stderr index f74c3abbb9..1e0998c6b7 100644 --- a/testsuite/tests/roles/should_compile/Roles13.stderr +++ b/testsuite/tests/roles/should_compile/Roles13.stderr @@ -2,19 +2,6 @@ ==================== Tidy Core ==================== Result size of Tidy Core = {terms: 51, types: 20, coercions: 5} --- RHS size: {terms: 2, types: 2, coercions: 0} -convert1 :: Wrap Age -> Wrap Age -[GblId, Arity=1, Caf=NoCafRefs] -convert1 = \ (ds :: Wrap Age) -> ds - --- RHS size: {terms: 1, types: 0, coercions: 5} -convert :: Wrap Age -> Int -[GblId, Arity=1, Caf=NoCafRefs] -convert = - convert1 - `cast` (<Wrap Age>_R -> Roles13.N:Wrap[0] Roles13.N:Age[0] - :: ((Wrap Age -> Wrap Age) :: *) ~R# ((Wrap Age -> Int) :: *)) - -- RHS size: {terms: 2, types: 0, coercions: 0} $trModule1 :: GHC.Types.TrName [GblId, Caf=NoCafRefs] @@ -31,19 +18,34 @@ Roles13.$trModule :: GHC.Types.Module Roles13.$trModule = GHC.Types.Module $trModule1 $trModule2 -- RHS size: {terms: 2, types: 0, coercions: 0} -$tc'MkAge1 :: GHC.Types.TrName +$tcWrap1 :: GHC.Types.TrName [GblId, Caf=NoCafRefs] -$tc'MkAge1 = GHC.Types.TrNameS "'MkAge"# +$tcWrap1 = GHC.Types.TrNameS "Wrap"# -- RHS size: {terms: 5, types: 0, coercions: 0} -Roles13.$tc'MkAge :: GHC.Types.TyCon +Roles13.$tcWrap :: GHC.Types.TyCon [GblId, Caf=NoCafRefs] -Roles13.$tc'MkAge = +Roles13.$tcWrap = GHC.Types.TyCon - 1226019810264079099## - 12180888342844277416## + 5278920226786541118## + 14554440859491798587## Roles13.$trModule - $tc'MkAge1 + $tcWrap1 + +-- RHS size: {terms: 2, types: 0, coercions: 0} +$tc'MkWrap1 :: GHC.Types.TrName +[GblId, Caf=NoCafRefs] +$tc'MkWrap1 = GHC.Types.TrNameS "'MkWrap"# + +-- RHS size: {terms: 5, types: 0, coercions: 0} +Roles13.$tc'MkWrap :: GHC.Types.TyCon +[GblId, Caf=NoCafRefs] +Roles13.$tc'MkWrap = + GHC.Types.TyCon + 12402878715225676312## + 13345418993613492500## + Roles13.$trModule + $tc'MkWrap1 -- RHS size: {terms: 2, types: 0, coercions: 0} $tcAge1 :: GHC.Types.TrName @@ -61,34 +63,32 @@ Roles13.$tcAge = $tcAge1 -- RHS size: {terms: 2, types: 0, coercions: 0} -$tc'MkWrap1 :: GHC.Types.TrName +$tc'MkAge1 :: GHC.Types.TrName [GblId, Caf=NoCafRefs] -$tc'MkWrap1 = GHC.Types.TrNameS "'MkWrap"# +$tc'MkAge1 = GHC.Types.TrNameS "'MkAge"# -- RHS size: {terms: 5, types: 0, coercions: 0} -Roles13.$tc'MkWrap :: GHC.Types.TyCon +Roles13.$tc'MkAge :: GHC.Types.TyCon [GblId, Caf=NoCafRefs] -Roles13.$tc'MkWrap = +Roles13.$tc'MkAge = GHC.Types.TyCon - 12402878715225676312## - 13345418993613492500## + 1226019810264079099## + 12180888342844277416## Roles13.$trModule - $tc'MkWrap1 + $tc'MkAge1 --- RHS size: {terms: 2, types: 0, coercions: 0} -$tcWrap1 :: GHC.Types.TrName -[GblId, Caf=NoCafRefs] -$tcWrap1 = GHC.Types.TrNameS "Wrap"# +-- RHS size: {terms: 2, types: 2, coercions: 0} +convert1 :: Wrap Age -> Wrap Age +[GblId, Arity=1, Caf=NoCafRefs] +convert1 = \ (ds :: Wrap Age) -> ds --- RHS size: {terms: 5, types: 0, coercions: 0} -Roles13.$tcWrap :: GHC.Types.TyCon -[GblId, Caf=NoCafRefs] -Roles13.$tcWrap = - GHC.Types.TyCon - 5278920226786541118## - 14554440859491798587## - Roles13.$trModule - $tcWrap1 +-- RHS size: {terms: 1, types: 0, coercions: 5} +convert :: Wrap Age -> Int +[GblId, Arity=1, Caf=NoCafRefs] +convert = + convert1 + `cast` (<Wrap Age>_R -> Roles13.N:Wrap[0] Roles13.N: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 8604b00ad2..b8331a3aa3 100644 --- a/testsuite/tests/roles/should_compile/Roles14.stderr +++ b/testsuite/tests/roles/should_compile/Roles14.stderr @@ -12,6 +12,9 @@ Dependent packages: [base-4.10.0.0, ghc-prim-0.5.0.0, integer-gmp-1.0.0.1] ==================== Typechecker ==================== +Roles12.$trModule + = GHC.Types.Module + (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles12"#) Roles12.$tcC2 = GHC.Types.TyCon 4006088231579841122## @@ -24,7 +27,4 @@ Roles12.$tc'C:C2 2795860317217328413## Roles12.$trModule (GHC.Types.TrNameS "'C:C2"#) -Roles12.$trModule - = GHC.Types.Module - (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles12"#) diff --git a/testsuite/tests/roles/should_compile/Roles2.stderr b/testsuite/tests/roles/should_compile/Roles2.stderr index cea02f5215..8d374f23b1 100644 --- a/testsuite/tests/roles/should_compile/Roles2.stderr +++ b/testsuite/tests/roles/should_compile/Roles2.stderr @@ -11,6 +11,9 @@ Dependent packages: [base-4.10.0.0, ghc-prim-0.5.0.0, integer-gmp-1.0.0.1] ==================== Typechecker ==================== +Roles2.$trModule + = GHC.Types.Module + (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles2"#) Roles2.$tcT2 = GHC.Types.TyCon 5934726586329293381## @@ -35,7 +38,4 @@ Roles2.$tc'K1 17563925141462511949## Roles2.$trModule (GHC.Types.TrNameS "'K1"#) -Roles2.$trModule - = GHC.Types.Module - (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles2"#) diff --git a/testsuite/tests/roles/should_compile/Roles3.stderr b/testsuite/tests/roles/should_compile/Roles3.stderr index 1541f892a9..4a6132e34c 100644 --- a/testsuite/tests/roles/should_compile/Roles3.stderr +++ b/testsuite/tests/roles/should_compile/Roles3.stderr @@ -33,6 +33,9 @@ Dependent packages: [base-4.10.0.0, ghc-prim-0.5.0.0, integer-gmp-1.0.0.1] ==================== Typechecker ==================== +Roles3.$trModule + = GHC.Types.Module + (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles3"#) Roles3.$tcC4 = GHC.Types.TyCon 12861862461396457184## @@ -81,7 +84,4 @@ Roles3.$tc'C:C1 15172069236577673237## Roles3.$trModule (GHC.Types.TrNameS "'C:C1"#) -Roles3.$trModule - = GHC.Types.Module - (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles3"#) diff --git a/testsuite/tests/roles/should_compile/Roles4.stderr b/testsuite/tests/roles/should_compile/Roles4.stderr index 49e9ac9768..0041556ac0 100644 --- a/testsuite/tests/roles/should_compile/Roles4.stderr +++ b/testsuite/tests/roles/should_compile/Roles4.stderr @@ -18,6 +18,9 @@ Dependent packages: [base-4.10.0.0, ghc-prim-0.5.0.0, integer-gmp-1.0.0.1] ==================== Typechecker ==================== +Roles4.$trModule + = GHC.Types.Module + (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles4"#) Roles4.$tcC3 = GHC.Types.TyCon 16502190608089501863## @@ -42,7 +45,4 @@ Roles4.$tc'C:C1 4382794907973051606## Roles4.$trModule (GHC.Types.TrNameS "'C:C1"#) -Roles4.$trModule - = GHC.Types.Module - (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles4"#) diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr index a527d1f02e..e9ab81ca72 100644 --- a/testsuite/tests/roles/should_compile/T8958.stderr +++ b/testsuite/tests/roles/should_compile/T8958.stderr @@ -20,6 +20,26 @@ Dependent packages: [base-4.10.0.0, ghc-prim-0.5.0.0, integer-gmp-1.0.0.1] ==================== Typechecker ==================== +AbsBinds [a] [] + {Exports: [T8958.$fRepresentationala <= $dRepresentational + wrap: <>] + Exported types: T8958.$fRepresentationala [InlPrag=CONLIKE] + :: forall a. Representational a + [LclIdX[DFunId], + Unf=DFun: \ (@ a) -> T8958.C:Representational TYPE: a] + Binds: $dRepresentational = T8958.C:Representational @ a + Evidence: [EvBinds{}]} +AbsBinds [a] [] + {Exports: [T8958.$fNominala <= $dNominal + wrap: <>] + Exported types: T8958.$fNominala [InlPrag=CONLIKE] + :: forall a. Nominal a + [LclIdX[DFunId], Unf=DFun: \ (@ a) -> T8958.C:Nominal TYPE: a] + Binds: $dNominal = T8958.C:Nominal @ a + Evidence: [EvBinds{}]} +T8958.$trModule + = GHC.Types.Module + (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "T8958"#) T8958.$tcMap = GHC.Types.TyCon 11173210732975605893## @@ -56,24 +76,4 @@ T8958.$tc'C:Nominal 1726092271306256063## T8958.$trModule (GHC.Types.TrNameS "'C:Nominal"#) -T8958.$trModule - = GHC.Types.Module - (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "T8958"#) -AbsBinds [a] [] - {Exports: [T8958.$fRepresentationala <= $dRepresentational - wrap: <>] - Exported types: T8958.$fRepresentationala [InlPrag=CONLIKE] - :: forall a. Representational a - [LclIdX[DFunId], - Unf=DFun: \ (@ a) -> T8958.C:Representational TYPE: a] - Binds: $dRepresentational = T8958.C:Representational @ a - Evidence: [EvBinds{}]} -AbsBinds [a] [] - {Exports: [T8958.$fNominala <= $dNominal - wrap: <>] - Exported types: T8958.$fNominala [InlPrag=CONLIKE] - :: forall a. Nominal a - [LclIdX[DFunId], Unf=DFun: \ (@ a) -> T8958.C:Nominal TYPE: a] - Binds: $dNominal = T8958.C:Nominal @ a - Evidence: [EvBinds{}]} diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr index 4598b3e8d1..eb5ca0b75a 100644 --- a/testsuite/tests/simplCore/should_compile/T7360.stderr +++ b/testsuite/tests/simplCore/should_compile/T7360.stderr @@ -17,55 +17,6 @@ T7360.$WFoo3 = \ (dt [Occ=Once!] :: Int) -> case dt of { GHC.Types.I# dt [Occ=Once] -> T7360.Foo3 dt } --- RHS size: {terms: 5, types: 2, coercions: 0} -fun1 [InlPrag=NOINLINE] :: Foo -> () -[GblId, Arity=1, Caf=NoCafRefs, Str=<S,1*U>] -fun1 = \ (x :: Foo) -> case x of { __DEFAULT -> GHC.Tuple.() } - --- RHS size: {terms: 2, types: 0, coercions: 0} -T7360.fun5 :: () -[GblId, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False, - WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 20 0}] -T7360.fun5 = fun1 T7360.Foo1 - --- RHS size: {terms: 2, types: 0, coercions: 0} -T7360.fun4 :: Int -[GblId, - Caf=NoCafRefs, - Str=m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, - WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] -T7360.fun4 = GHC.Types.I# 0# - --- RHS size: {terms: 16, types: 13, coercions: 0} -fun2 :: forall a. [a] -> ((), Int) -[GblId, - Arity=1, - Str=<L,1*U>m, - Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, - WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) - Tmpl= \ (@ a) (x [Occ=Once!] :: [a]) -> - (T7360.fun5, - case x of wild { - [] -> T7360.fun4; - : _ [Occ=Dead] _ [Occ=Dead] -> - case GHC.List.$wlenAcc @ a wild 0# of ww2 { __DEFAULT -> - GHC.Types.I# ww2 - } - })}] -fun2 = - \ (@ a) (x :: [a]) -> - (T7360.fun5, - case x of wild { - [] -> T7360.fun4; - : ds ds1 -> - case GHC.List.$wlenAcc @ a wild 0# of ww2 { __DEFAULT -> - GHC.Types.I# ww2 - } - }) - -- RHS size: {terms: 2, types: 0, coercions: 0} T7360.$trModule2 :: GHC.Types.TrName [GblId, @@ -95,27 +46,50 @@ T7360.$trModule = GHC.Types.Module T7360.$trModule2 T7360.$trModule1 -- RHS size: {terms: 2, types: 0, coercions: 0} -T7360.$tc'Foo6 :: GHC.Types.TrName +T7360.$tcFoo1 :: GHC.Types.TrName +[GblId, + Caf=NoCafRefs, + Str=m1, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] +T7360.$tcFoo1 = GHC.Types.TrNameS "Foo"# + +-- RHS size: {terms: 5, types: 0, coercions: 0} +T7360.$tcFoo :: GHC.Types.TyCon +[GblId, + Caf=NoCafRefs, + Str=m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 50}] +T7360.$tcFoo = + GHC.Types.TyCon + 8358641983981300860## + 582034888424804490## + T7360.$trModule + T7360.$tcFoo1 + +-- RHS size: {terms: 2, types: 0, coercions: 0} +T7360.$tc'Foo4 :: GHC.Types.TrName [GblId, Caf=NoCafRefs, Str=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}] -T7360.$tc'Foo6 = GHC.Types.TrNameS "'Foo3"# +T7360.$tc'Foo4 = GHC.Types.TrNameS "'Foo1"# -- RHS size: {terms: 5, types: 0, coercions: 0} -T7360.$tc'Foo3 :: GHC.Types.TyCon +T7360.$tc'Foo1 :: GHC.Types.TyCon [GblId, Caf=NoCafRefs, Str=m, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 50}] -T7360.$tc'Foo3 = +T7360.$tc'Foo1 = GHC.Types.TyCon - 10507205234936349519## - 8302184214013227554## + 2058692068419561651## + 9152017373001677943## T7360.$trModule - T7360.$tc'Foo6 + T7360.$tc'Foo4 -- RHS size: {terms: 2, types: 0, coercions: 0} T7360.$tc'Foo5 :: GHC.Types.TrName @@ -141,50 +115,76 @@ T7360.$tc'Foo2 = T7360.$tc'Foo5 -- RHS size: {terms: 2, types: 0, coercions: 0} -T7360.$tc'Foo4 :: GHC.Types.TrName +T7360.$tc'Foo6 :: GHC.Types.TrName [GblId, Caf=NoCafRefs, Str=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}] -T7360.$tc'Foo4 = GHC.Types.TrNameS "'Foo1"# +T7360.$tc'Foo6 = GHC.Types.TrNameS "'Foo3"# -- RHS size: {terms: 5, types: 0, coercions: 0} -T7360.$tc'Foo1 :: GHC.Types.TyCon +T7360.$tc'Foo3 :: GHC.Types.TyCon [GblId, Caf=NoCafRefs, Str=m, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 50}] -T7360.$tc'Foo1 = +T7360.$tc'Foo3 = GHC.Types.TyCon - 2058692068419561651## - 9152017373001677943## + 10507205234936349519## + 8302184214013227554## T7360.$trModule - T7360.$tc'Foo4 + T7360.$tc'Foo6 + +-- RHS size: {terms: 5, types: 2, coercions: 0} +fun1 [InlPrag=NOINLINE] :: Foo -> () +[GblId, Arity=1, Caf=NoCafRefs, Str=<S,1*U>] +fun1 = \ (x :: Foo) -> case x of { __DEFAULT -> GHC.Tuple.() } -- RHS size: {terms: 2, types: 0, coercions: 0} -T7360.$tcFoo1 :: GHC.Types.TrName +T7360.fun5 :: () [GblId, - Caf=NoCafRefs, - Str=m1, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, - WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}] -T7360.$tcFoo1 = GHC.Types.TrNameS "Foo"# + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False, + WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 20 0}] +T7360.fun5 = fun1 T7360.Foo1 --- RHS size: {terms: 5, types: 0, coercions: 0} -T7360.$tcFoo :: GHC.Types.TyCon +-- RHS size: {terms: 2, types: 0, coercions: 0} +T7360.fun4 :: Int [GblId, Caf=NoCafRefs, Str=m, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, - WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 50}] -T7360.$tcFoo = - GHC.Types.TyCon - 8358641983981300860## - 582034888424804490## - T7360.$trModule - T7360.$tcFoo1 + WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] +T7360.fun4 = GHC.Types.I# 0# + +-- RHS size: {terms: 16, types: 13, coercions: 0} +fun2 :: forall a. [a] -> ((), Int) +[GblId, + Arity=1, + Str=<L,1*U>m, + Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, + Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) + Tmpl= \ (@ a) (x [Occ=Once!] :: [a]) -> + (T7360.fun5, + case x of wild { + [] -> T7360.fun4; + : _ [Occ=Dead] _ [Occ=Dead] -> + case GHC.List.$wlenAcc @ a wild 0# of ww2 { __DEFAULT -> + GHC.Types.I# ww2 + } + })}] +fun2 = + \ (@ a) (x :: [a]) -> + (T7360.fun5, + case x of wild { + [] -> T7360.fun4; + : ds ds1 -> + case GHC.List.$wlenAcc @ a wild 0# of ww2 { __DEFAULT -> + GHC.Types.I# ww2 + } + }) diff --git a/testsuite/tests/simplCore/should_compile/T8274.stdout b/testsuite/tests/simplCore/should_compile/T8274.stdout index 43830c7135..a7b16c5206 100644 --- a/testsuite/tests/simplCore/should_compile/T8274.stdout +++ b/testsuite/tests/simplCore/should_compile/T8274.stdout @@ -1,12 +1,12 @@ -p = T8274.Positives 42# 4.23# 4.23## '4'# 4## -n = T8274.Negatives -4# -4.0# -4.0## T8274.$trModule2 = GHC.Types.TrNameS "main"# T8274.$trModule1 = GHC.Types.TrNameS "T8274"# -T8274.$tc'Positives1 = GHC.Types.TrNameS "'Positives"# -T8274.$tc'Positives = GHC.Types.TyCon 14732531009298850569## 4925356269917933860## T8274.$trModule T8274.$tc'Positives1 -T8274.$tcP1 = GHC.Types.TrNameS "P"# -T8274.$tcP = GHC.Types.TyCon 11095028091707994303## 9476557054198009608## T8274.$trModule T8274.$tcP1 -T8274.$tc'Negatives1 = GHC.Types.TrNameS "'Negatives"# -T8274.$tc'Negatives = GHC.Types.TyCon 15950179315687996644## 11481167534507418130## T8274.$trModule T8274.$tc'Negatives1 T8274.$tcN1 = GHC.Types.TrNameS "N"# T8274.$tcN = GHC.Types.TyCon 7479687563082171902## 17616649989360543185## T8274.$trModule T8274.$tcN1 +T8274.$tc'Negatives1 = GHC.Types.TrNameS "'Negatives"# +T8274.$tc'Negatives = GHC.Types.TyCon 15950179315687996644## 11481167534507418130## T8274.$trModule T8274.$tc'Negatives1 +T8274.$tcP1 = GHC.Types.TrNameS "P"# +T8274.$tcP = GHC.Types.TyCon 11095028091707994303## 9476557054198009608## T8274.$trModule T8274.$tcP1 +T8274.$tc'Positives1 = GHC.Types.TrNameS "'Positives"# +T8274.$tc'Positives = GHC.Types.TyCon 14732531009298850569## 4925356269917933860## T8274.$trModule T8274.$tc'Positives1 +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/noinline01.stderr b/testsuite/tests/simplCore/should_compile/noinline01.stderr index b100172381..a94e6e0c15 100644 --- a/testsuite/tests/simplCore/should_compile/noinline01.stderr +++ b/testsuite/tests/simplCore/should_compile/noinline01.stderr @@ -1,14 +1,5 @@ ==================== Pre unarise: ==================== -Noinline01.f [InlPrag=INLINE (sat-args=1)] - :: forall p. p -> GHC.Types.Bool -[GblId, Arity=1, Caf=NoCafRefs, Str=<L,A>, Unf=OtherCon []] = - \r [eta] GHC.Types.True []; - -Noinline01.g :: GHC.Types.Bool -[GblId] = - \u [] Noinline01.f GHC.Types.False; - Noinline01.$trModule2 :: GHC.Types.TrName [GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] = NO_CCS GHC.Types.TrNameS! ["main"#]; @@ -22,9 +13,6 @@ Noinline01.$trModule :: GHC.Types.Module NO_CCS GHC.Types.Module! [Noinline01.$trModule2 Noinline01.$trModule1]; - - -==================== STG syntax: ==================== Noinline01.f [InlPrag=INLINE (sat-args=1)] :: forall p. p -> GHC.Types.Bool [GblId, Arity=1, Caf=NoCafRefs, Str=<L,A>, Unf=OtherCon []] = @@ -34,6 +22,9 @@ Noinline01.g :: GHC.Types.Bool [GblId] = \u [] Noinline01.f GHC.Types.False; + + +==================== STG syntax: ==================== Noinline01.$trModule2 :: GHC.Types.TrName [GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] = NO_CCS GHC.Types.TrNameS! ["main"#]; @@ -47,4 +38,13 @@ Noinline01.$trModule :: GHC.Types.Module NO_CCS GHC.Types.Module! [Noinline01.$trModule2 Noinline01.$trModule1]; +Noinline01.f [InlPrag=INLINE (sat-args=1)] + :: forall p. p -> GHC.Types.Bool +[GblId, Arity=1, Caf=NoCafRefs, Str=<L,A>, Unf=OtherCon []] = + \r [eta] GHC.Types.True []; + +Noinline01.g :: GHC.Types.Bool +[GblId] = + \u [] Noinline01.f GHC.Types.False; + diff --git a/testsuite/tests/simplCore/should_compile/par01.stderr b/testsuite/tests/simplCore/should_compile/par01.stderr index 90d467f71c..36a5a25f08 100644 --- a/testsuite/tests/simplCore/should_compile/par01.stderr +++ b/testsuite/tests/simplCore/should_compile/par01.stderr @@ -2,17 +2,6 @@ ==================== CorePrep ==================== Result size of CorePrep = {terms: 18, types: 8, coercions: 0} -Rec { --- RHS size: {terms: 7, types: 3, coercions: 0} -Par01.depth [Occ=LoopBreaker] :: GHC.Types.Int -> GHC.Types.Int -[GblId, Arity=1, Caf=NoCafRefs, Str=<L,U>, Unf=OtherCon []] -Par01.depth = - \ (d :: GHC.Types.Int) -> - case GHC.Prim.par# @ GHC.Types.Int d of { __DEFAULT -> - Par01.depth d - } -end Rec } - -- RHS size: {terms: 2, types: 0, coercions: 0} Par01.$trModule2 :: GHC.Types.TrName [GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] @@ -29,5 +18,16 @@ Par01.$trModule :: GHC.Types.Module Par01.$trModule = GHC.Types.Module Par01.$trModule2 Par01.$trModule1 +Rec { +-- RHS size: {terms: 7, types: 3, coercions: 0} +Par01.depth [Occ=LoopBreaker] :: GHC.Types.Int -> GHC.Types.Int +[GblId, Arity=1, Caf=NoCafRefs, Str=<L,U>, Unf=OtherCon []] +Par01.depth = + \ (d :: GHC.Types.Int) -> + case GHC.Prim.par# @ GHC.Types.Int d of { __DEFAULT -> + Par01.depth d + } +end Rec } + diff --git a/testsuite/tests/stranal/should_compile/T10694.stderr b/testsuite/tests/stranal/should_compile/T10694.stderr index 06fc3a7a8a..5d97c1639b 100644 --- a/testsuite/tests/stranal/should_compile/T10694.stderr +++ b/testsuite/tests/stranal/should_compile/T10694.stderr @@ -2,42 +2,6 @@ ==================== Tidy Core ==================== Result size of Tidy Core = {terms: 59, types: 41, coercions: 0} --- RHS size: {terms: 39, types: 23, coercions: 0} -pm [InlPrag=NOINLINE] :: Int -> Int -> (Int, Int) -[GblId, Arity=2, Str=<L,U(U)><L,U(U)>m] -pm = - \ (x_axr :: Int) (y_axs :: Int) -> - let { - l_sVj :: Int - [LclId] - l_sVj = - case x_axr of { GHC.Types.I# x1_aUL -> case y_axs of { GHC.Types.I# y1_aUP -> GHC.Types.I# (GHC.Prim.+# x1_aUL y1_aUP) } } } in - let { - l1_sVl :: Int - [LclId] - l1_sVl = - case x_axr of { GHC.Types.I# x1_aUV -> case y_axs of { GHC.Types.I# y1_aUZ -> GHC.Types.I# (GHC.Prim.-# x1_aUV y1_aUZ) } } } in - let { - l2_sVk :: [Int] - [LclId] - l2_sVk = GHC.Types.: @ Int l1_sVl (GHC.Types.[] @ Int) } in - let { - l3_sVa :: [Int] - [LclId] - l3_sVa = GHC.Types.: @ Int l_sVj l2_sVk } in - (GHC.List.$w!! @ Int l3_sVa 0#, GHC.List.$w!! @ Int l3_sVa 1#) - --- RHS size: {terms: 8, types: 7, coercions: 0} -m :: Int -> Int -> Int -[GblId, - Arity=2, - Str=<L,U(U)><L,U(U)>, - Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False) - Tmpl= \ (x_aCt [Occ=Once] :: Int) (y_aCu [Occ=Once] :: Int) -> - case pm x_aCt y_aCu of { (_ [Occ=Dead], mr_aCw [Occ=Once]) -> mr_aCw }}] -m = \ (x_aCt :: Int) (y_aCu :: Int) -> case pm x_aCt y_aCu of { (pr_aCv, mr_aCw) -> mr_aCw } - -- RHS size: {terms: 2, types: 0, coercions: 0} T10694.$trModule2 :: GHC.Types.TrName [GblId, @@ -62,5 +26,41 @@ T10694.$trModule :: GHC.Types.Module Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] T10694.$trModule = GHC.Types.Module T10694.$trModule2 T10694.$trModule1 +-- RHS size: {terms: 39, types: 23, coercions: 0} +pm [InlPrag=NOINLINE] :: Int -> Int -> (Int, Int) +[GblId, Arity=2, Str=<L,U(U)><L,U(U)>m] +pm = + \ (x_axR :: Int) (y_axS :: Int) -> + let { + l_sUO :: Int + [LclId] + l_sUO = + case x_axR of { GHC.Types.I# x1_aUk -> case y_axS of { GHC.Types.I# y1_aUo -> GHC.Types.I# (GHC.Prim.+# x1_aUk y1_aUo) } } } in + let { + l1_sUQ :: Int + [LclId] + l1_sUQ = + case x_axR of { GHC.Types.I# x1_aUu -> case y_axS of { GHC.Types.I# y1_aUy -> GHC.Types.I# (GHC.Prim.-# x1_aUu y1_aUy) } } } in + let { + l2_sUP :: [Int] + [LclId, Unf=OtherCon []] + l2_sUP = GHC.Types.: @ Int l1_sUQ (GHC.Types.[] @ Int) } in + let { + l3_sUF :: [Int] + [LclId, Unf=OtherCon []] + l3_sUF = GHC.Types.: @ Int l_sUO l2_sUP } in + (GHC.List.$w!! @ Int l3_sUF 0#, GHC.List.$w!! @ Int l3_sUF 1#) + +-- RHS size: {terms: 8, types: 7, coercions: 0} +m :: Int -> Int -> Int +[GblId, + Arity=2, + Str=<L,U(U)><L,U(U)>, + Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, + Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False) + Tmpl= \ (x_aCT [Occ=Once] :: Int) (y_aCU [Occ=Once] :: Int) -> + case pm x_aCT y_aCU of { (_ [Occ=Dead], mr_aCW [Occ=Once]) -> mr_aCW }}] +m = \ (x_aCT :: Int) (y_aCU :: Int) -> case pm x_aCT y_aCU of { (pr_aCV, mr_aCW) -> mr_aCW } + diff --git a/testsuite/tests/th/TH_Roles2.stderr b/testsuite/tests/th/TH_Roles2.stderr index 33fec8e9d5..5d68fba56c 100644 --- a/testsuite/tests/th/TH_Roles2.stderr +++ b/testsuite/tests/th/TH_Roles2.stderr @@ -4,18 +4,18 @@ TYPE CONSTRUCTORS data T (a :: k) COERCION AXIOMS Dependent modules: [] -Dependent packages: [array-0.5.1.1, base-4.9.0.0, deepseq-1.4.2.0, +Dependent packages: [array-0.5.1.2, base-4.10.0.0, deepseq-1.4.3.0, ghc-boot-th-8.1, ghc-prim-0.5.0.0, integer-gmp-1.0.0.1, - pretty-1.1.3.3, template-haskell-2.11.0.0] + pretty-1.1.3.3, template-haskell-2.12.0.0] ==================== Typechecker ==================== +TH_Roles2.$trModule + = GHC.Types.Module + (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "TH_Roles2"#) TH_Roles2.$tcT = GHC.Types.TyCon 6325001754388382679## 4656387726417942748## TH_Roles2.$trModule (GHC.Types.TrNameS "T"#) -TH_Roles2.$trModule - = GHC.Types.Module - (GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "TH_Roles2"#) diff --git a/testsuite/tests/typecheck/should_compile/tc211.stderr b/testsuite/tests/typecheck/should_compile/tc211.stderr index c57c59b3fc..54524cc390 100644 --- a/testsuite/tests/typecheck/should_compile/tc211.stderr +++ b/testsuite/tests/typecheck/should_compile/tc211.stderr @@ -1,7 +1,7 @@ tc211.hs:20:8: error: • Couldn't match expected type ‘forall a. a -> a’ - with actual type ‘a1 -> a1’ + with actual type ‘a0 -> a0’ • In the expression: (:) :: (forall a. a -> a) -> [forall a. a -> a] -> [forall a. a -> a] @@ -16,15 +16,15 @@ tc211.hs:20:8: error: (head foo) foo tc211.hs:25:8: error: - • Couldn't match type ‘a3 -> a3’ with ‘forall a. a -> a’ + • Couldn't match type ‘a2 -> a2’ with ‘forall a. a -> a’ Expected type: [forall a. a -> a] - Actual type: [a3 -> a3] + Actual type: [a2 -> a2] • In the expression: (head foo) : (tail foo) In an equation for ‘barr’: barr = (head foo) : (tail foo) tc211.hs:25:20: error: - • Couldn't match type ‘forall a. a -> a’ with ‘a3 -> a3’ - Expected type: [a3 -> a3] + • Couldn't match type ‘forall a. a -> a’ with ‘a2 -> a2’ + Expected type: [a2 -> a2] Actual type: [forall a. a -> a] • In the second argument of ‘(:)’, namely ‘(tail foo)’ In the expression: (head foo) : (tail foo) @@ -32,7 +32,7 @@ tc211.hs:25:20: error: tc211.hs:62:18: error: • Couldn't match expected type ‘forall a. a -> a’ - with actual type ‘a0 -> a0’ + with actual type ‘a1 -> a1’ • In the expression: Cons :: (forall a. a -> a) @@ -52,21 +52,21 @@ tc211.hs:62:18: error: tc211.hs:68:8: error: • Couldn't match expected type ‘forall a. a -> a’ - with actual type ‘a2 -> a2’ + with actual type ‘a3 -> a3’ • In the expression: Cons :: ((forall a. a -> a) - -> List (forall a. a -> a) -> List (forall a. a -> a)) + -> List (forall a. a -> a) -> List (forall a. a -> a)) In the expression: (Cons :: ((forall a. a -> a) - -> List (forall a. a -> a) -> List (forall a. a -> a))) + -> List (forall a. a -> a) -> List (forall a. a -> a))) (\ x -> x) Nil In an equation for ‘xs2’: xs2 = (Cons :: ((forall a. a -> a) - -> List (forall a. a -> a) -> List (forall a. a -> a))) + -> List (forall a. a -> a) -> List (forall a. a -> a))) (\ x -> x) Nil tc211.hs:76:9: error: diff --git a/testsuite/tests/typecheck/should_fail/T10971b.stderr b/testsuite/tests/typecheck/should_fail/T10971b.stderr index 2e63617464..f9b9647a08 100644 --- a/testsuite/tests/typecheck/should_fail/T10971b.stderr +++ b/testsuite/tests/typecheck/should_fail/T10971b.stderr @@ -1,11 +1,11 @@ T10971b.hs:4:11: error: - • Ambiguous type variable ‘t2’ arising from a use of ‘length’ - prevents the constraint ‘(Foldable t2)’ from being solved. + • Ambiguous type variable ‘t0’ arising from a use of ‘length’ + prevents the constraint ‘(Foldable t0)’ from being solved. Relevant bindings include - x :: t2 a (bound at T10971b.hs:4:6) - f :: t2 a -> Int (bound at T10971b.hs:4:1) - Probable fix: use a type annotation to specify what ‘t2’ should be. + x :: t0 a (bound at T10971b.hs:4:6) + f :: t0 a -> Int (bound at T10971b.hs:4:1) + Probable fix: use a type annotation to specify what ‘t0’ should be. These potential instances exist: instance Foldable (Either a) -- Defined in ‘Data.Foldable’ instance Foldable Maybe -- Defined in ‘Data.Foldable’ @@ -36,12 +36,12 @@ T10971b.hs:5:13: error: In an equation for ‘g’: g = \ f x -> fmapDefault f x T10971b.hs:6:14: error: - • Ambiguous type variable ‘t0’ arising from a use of ‘fmapDefault’ - prevents the constraint ‘(Traversable t0)’ from being solved. + • Ambiguous type variable ‘t2’ arising from a use of ‘fmapDefault’ + prevents the constraint ‘(Traversable t2)’ from being solved. Relevant bindings include - x :: t0 a (bound at T10971b.hs:6:8) - h :: (a -> b) -> t0 a -> (t0 b, Int) (bound at T10971b.hs:6:1) - Probable fix: use a type annotation to specify what ‘t0’ should be. + x :: t2 a (bound at T10971b.hs:6:8) + h :: (a -> b) -> t2 a -> (t2 b, Int) (bound at T10971b.hs:6:1) + Probable fix: use a type annotation to specify what ‘t2’ should be. These potential instances exist: instance Traversable (Either a) -- Defined in ‘Data.Traversable’ instance Traversable Maybe -- Defined in ‘Data.Traversable’ @@ -54,12 +54,12 @@ T10971b.hs:6:14: error: In the expression: \ f x -> (fmapDefault f x, length x) T10971b.hs:6:31: error: - • Ambiguous type variable ‘t0’ arising from a use of ‘length’ - prevents the constraint ‘(Foldable t0)’ from being solved. + • Ambiguous type variable ‘t2’ arising from a use of ‘length’ + prevents the constraint ‘(Foldable t2)’ from being solved. Relevant bindings include - x :: t0 a (bound at T10971b.hs:6:8) - h :: (a -> b) -> t0 a -> (t0 b, Int) (bound at T10971b.hs:6:1) - Probable fix: use a type annotation to specify what ‘t0’ should be. + x :: t2 a (bound at T10971b.hs:6:8) + h :: (a -> b) -> t2 a -> (t2 b, Int) (bound at T10971b.hs:6:1) + Probable fix: use a type annotation to specify what ‘t2’ should be. These potential instances exist: instance Foldable (Either a) -- Defined in ‘Data.Foldable’ instance Foldable Maybe -- Defined in ‘Data.Foldable’ diff --git a/testsuite/tests/typecheck/should_fail/T10971d.stderr b/testsuite/tests/typecheck/should_fail/T10971d.stderr index c5ad886683..9dddc1e40c 100644 --- a/testsuite/tests/typecheck/should_fail/T10971d.stderr +++ b/testsuite/tests/typecheck/should_fail/T10971d.stderr @@ -1,6 +1,6 @@ T10971d.hs:4:14: error: - • Couldn't match expected type ‘[a0]’ + • Couldn't match expected type ‘[a1]’ with actual type ‘Maybe Integer’ • In the first argument of ‘f’, namely ‘(Just 1)’ In the second argument of ‘($)’, namely ‘f (Just 1)’ @@ -14,7 +14,7 @@ T10971d.hs:5:19: error: In a stmt of a 'do' block: print $ g (+ 1) (Just 5) T10971d.hs:6:23: error: - • Couldn't match expected type ‘[b0]’ with actual type ‘Maybe a1’ + • Couldn't match expected type ‘[b0]’ with actual type ‘Maybe a0’ • In the second argument of ‘h’, namely ‘Nothing’ In the second argument of ‘($)’, namely ‘h (const 5) Nothing’ In a stmt of a 'do' block: print $ h (const 5) Nothing diff --git a/testsuite/tests/typecheck/should_fail/T4921.stderr b/testsuite/tests/typecheck/should_fail/T4921.stderr index 8eff919aea..b187cb4368 100644 --- a/testsuite/tests/typecheck/should_fail/T4921.stderr +++ b/testsuite/tests/typecheck/should_fail/T4921.stderr @@ -1,9 +1,9 @@ T4921.hs:10:9: error: - • Ambiguous type variables ‘a0’, ‘b1’ arising from a use of ‘f’ - prevents the constraint ‘(C a0 b1)’ from being solved. + • Ambiguous type variables ‘a0’, ‘b0’ arising from a use of ‘f’ + prevents the constraint ‘(C a0 b0)’ from being solved. Relevant bindings include x :: a0 (bound at T4921.hs:10:1) - Probable fix: use a type annotation to specify what ‘a0’, ‘b1’ should be. + Probable fix: use a type annotation to specify what ‘a0’, ‘b0’ should be. These potential instance exist: instance C Int Char -- Defined at T4921.hs:7:10 • In the first argument of ‘fst’, namely ‘f’ @@ -11,9 +11,9 @@ T4921.hs:10:9: error: In an equation for ‘x’: x = fst f T4921.hs:12:9: error: - • Ambiguous type variable ‘b0’ arising from a use of ‘f’ - prevents the constraint ‘(C Int b0)’ from being solved. - Probable fix: use a type annotation to specify what ‘b0’ should be. + • Ambiguous type variable ‘b1’ arising from a use of ‘f’ + prevents the constraint ‘(C Int b1)’ from being solved. + Probable fix: use a type annotation to specify what ‘b1’ should be. These potential instance exist: instance C Int Char -- Defined at T4921.hs:7:10 • In the first argument of ‘fst’, namely ‘f’ diff --git a/testsuite/tests/typecheck/should_fail/T5684.stderr b/testsuite/tests/typecheck/should_fail/T5684.stderr index ed2af704f4..f871e9cf5e 100644 --- a/testsuite/tests/typecheck/should_fail/T5684.stderr +++ b/testsuite/tests/typecheck/should_fail/T5684.stderr @@ -8,7 +8,7 @@ T5684.hs:20:12: error: flop1 = [op False False, op 'c' undefined, op True undefined] T5684.hs:24:12: error: - • No instance for (B Char b5) arising from a use of ‘op’ + • No instance for (B Char b0) arising from a use of ‘op’ • In the expression: op 'c' undefined In the expression: [op False False, op 'c' undefined, op True undefined] @@ -24,7 +24,7 @@ T5684.hs:29:12: error: flop2 = [op False False, op True undefined, op 'c' undefined] T5684.hs:31:12: error: - • No instance for (B Char b4) arising from a use of ‘op’ + • No instance for (B Char b1) arising from a use of ‘op’ • In the expression: op 'c' undefined In the expression: [op False False, op True undefined, op 'c' undefined] @@ -32,7 +32,7 @@ T5684.hs:31:12: error: flop2 = [op False False, op True undefined, op 'c' undefined] T5684.hs:35:12: error: - • No instance for (B Char b3) arising from a use of ‘op’ + • No instance for (B Char b2) arising from a use of ‘op’ • In the expression: op 'c' undefined In the expression: [op 'c' undefined, op True undefined, op False False] @@ -48,7 +48,7 @@ T5684.hs:37:12: error: flop3 = [op 'c' undefined, op True undefined, op False False] T5684.hs:40:12: error: - • No instance for (B Char b2) arising from a use of ‘op’ + • No instance for (B Char b3) arising from a use of ‘op’ • In the expression: op 'c' undefined In the expression: [op 'c' undefined, op False False, op True undefined] @@ -64,7 +64,7 @@ T5684.hs:41:12: error: flop4 = [op 'c' undefined, op False False, op True undefined] T5684.hs:47:12: error: - • No instance for (B Char b1) arising from a use of ‘op’ + • No instance for (B Char b4) arising from a use of ‘op’ • In the expression: op 'c' undefined In the expression: [op True undefined, op 'c' undefined, op False False] @@ -88,7 +88,7 @@ T5684.hs:53:12: error: flop6 = [op True undefined, op False False, op 'c' undefined] T5684.hs:54:12: error: - • No instance for (B Char b0) arising from a use of ‘op’ + • No instance for (B Char b5) arising from a use of ‘op’ • In the expression: op 'c' undefined In the expression: [op True undefined, op False False, op 'c' undefined] diff --git a/testsuite/tests/typecheck/should_fail/T6069.stderr b/testsuite/tests/typecheck/should_fail/T6069.stderr index e1c2e5653f..7d4a589f5d 100644 --- a/testsuite/tests/typecheck/should_fail/T6069.stderr +++ b/testsuite/tests/typecheck/should_fail/T6069.stderr @@ -1,8 +1,8 @@ T6069.hs:13:15: error: - • Couldn't match type ‘ST s0 Int’ with ‘forall s. ST s a0’ - Expected type: ST s0 Int -> a0 - Actual type: (forall s. ST s a0) -> a0 + • Couldn't match type ‘ST s2 Int’ with ‘forall s. ST s a2’ + Expected type: ST s2 Int -> a2 + Actual type: (forall s. ST s a2) -> a2 • In the second argument of ‘(.)’, namely ‘runST’ In the expression: print . runST In the expression: (print . runST) fourty_two @@ -16,9 +16,9 @@ T6069.hs:14:15: error: In the expression: (print . runST) $ fourty_two T6069.hs:15:16: error: - • Couldn't match type ‘ST s2 Int’ with ‘forall s. ST s a2’ - Expected type: ST s2 Int -> a2 - Actual type: (forall s. ST s a2) -> a2 + • Couldn't match type ‘ST s0 Int’ with ‘forall s. ST s a0’ + Expected type: ST s0 Int -> a0 + Actual type: (forall s. ST s a0) -> a0 • In the second argument of ‘(.)’, namely ‘runST’ In the first argument of ‘($)’, namely ‘(print . runST)’ In the expression: (print . runST) $ diff --git a/testsuite/tests/typecheck/should_fail/T8603.stderr b/testsuite/tests/typecheck/should_fail/T8603.stderr index d87bd635c4..b7dc49e1a3 100644 --- a/testsuite/tests/typecheck/should_fail/T8603.stderr +++ b/testsuite/tests/typecheck/should_fail/T8603.stderr @@ -5,11 +5,11 @@ T8603.hs:13:10: error: • In the instance declaration for ‘Monad RV’ T8603.hs:29:17: error: - • Couldn't match type ‘RV a1’ with ‘StateT s RV a0’ - Expected type: [Integer] -> StateT s RV a0 - Actual type: (->) ((->) [a1]) (RV a1) + • Couldn't match type ‘RV a0’ with ‘StateT s RV a1’ + Expected type: [Integer] -> StateT s RV a1 + Actual type: (->) ((->) [a0]) (RV a0) • The function ‘lift’ is applied to two arguments, - but its type ‘([a1] -> RV a1) -> (->) ((->) [a1]) (RV a1)’ + but its type ‘([a0] -> RV a0) -> (->) ((->) [a0]) (RV a0)’ has only one In a stmt of a 'do' block: prize <- lift uniform [1, 2, 3] In the expression: diff --git a/testsuite/tests/typecheck/should_fail/tcfail207.stderr b/testsuite/tests/typecheck/should_fail/tcfail207.stderr index 986d7d5740..de2b21369c 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail207.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail207.stderr @@ -1,14 +1,14 @@ -tcfail207.hs:5:7: - Couldn't match expected type ‘[Int] -> [Int]’ - with actual type ‘[a1]’ - Possible cause: ‘take’ is applied to too many arguments - In the expression: take x [] - In an equation for ‘f’: f x = take x [] +tcfail207.hs:5:7: error: + • Couldn't match expected type ‘[Int] -> [Int]’ + with actual type ‘[a0]’ + • Possible cause: ‘take’ is applied to too many arguments + In the expression: take x [] + In an equation for ‘f’: f x = take x [] -tcfail207.hs:9:5: - Couldn't match expected type ‘[Int]’ - with actual type ‘[a0] -> [a0]’ - Probable cause: ‘take’ is applied to too few arguments - In the expression: take 3 - In an equation for ‘g’: g = take 3 +tcfail207.hs:9:5: error: + • Couldn't match expected type ‘[Int]’ + with actual type ‘[a1] -> [a1]’ + • Probable cause: ‘take’ is applied to too few arguments + In the expression: take 3 + In an equation for ‘g’: g = take 3 |