diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2016-03-18 11:20:31 -0400 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2016-03-21 12:16:11 -0400 |
commit | 0b89064cc67cb4fbdba0044ab59a17b20bbde1db (patch) | |
tree | 7d9ddb0c1f94fa5f5e9dc2a780ed136adbc598f6 /testsuite/tests | |
parent | 1701255c06fed2aa2811f7f29f108d88fc4d6f26 (diff) | |
download | haskell-0b89064cc67cb4fbdba0044ab59a17b20bbde1db.tar.gz |
Make equality print better. (#11712)
Diffstat (limited to 'testsuite/tests')
18 files changed, 37 insertions, 36 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr index c3b23ff595..63f13db31d 100644 --- a/testsuite/tests/deSugar/should_compile/T2431.stderr +++ b/testsuite/tests/deSugar/should_compile/T2431.stderr @@ -10,9 +10,11 @@ T2431.$WRefl [InlPrag=INLINE] :: forall a. a :~: a Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=0,unsat_ok=False,boring_ok=False) - Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a GHC.Prim.~# a)}] + Tmpl= \ (@ a) -> + T2431.Refl @ a @ a @~ (<a>_N :: (a :: *) GHC.Prim.~# (a :: *))}] T2431.$WRefl = - \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a GHC.Prim.~# a) + \ (@ 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 diff --git a/testsuite/tests/gadt/T7558.stderr b/testsuite/tests/gadt/T7558.stderr index 5c610b2895..6618346452 100644 --- a/testsuite/tests/gadt/T7558.stderr +++ b/testsuite/tests/gadt/T7558.stderr @@ -7,7 +7,7 @@ T7558.hs:8:4: error: at T7558.hs:7:6 Inaccessible code in a pattern with constructor: - MkT :: forall a b. (a ~ Maybe b) => a -> Maybe b -> T a b, + MkT :: forall a b. a ~ Maybe b => a -> Maybe b -> T a b, in an equation for ‘f’ • In the pattern: MkT x y In an equation for ‘f’: f (MkT x y) = [x, y] `seq` True diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr index 859142427c..7318eb632a 100644 --- a/testsuite/tests/ghci/scripts/Defer02.stderr +++ b/testsuite/tests/ghci/scripts/Defer02.stderr @@ -90,13 +90,13 @@ Couldn't match type ‘Int’ with ‘Bool’ Inaccessible code in the type signature for: - k :: (Int ~ Bool) => Int -> Bool + k :: Int ~ Bool => Int -> Bool ../../typecheck/should_run/Defer01.hs:45:6: warning: [-Wdeferred-type-errors (in -Wdefault)] • Couldn't match type ‘Int’ with ‘Bool’ Inaccessible code in the type signature for: - k :: (Int ~ Bool) => Int -> Bool + k :: Int ~ Bool => Int -> Bool • In the ambiguity check for ‘k’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes In the type signature: diff --git a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr index 37b1135c48..596b6e2612 100644 --- a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr +++ b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr @@ -4,7 +4,7 @@ PushedInAsGivens.hs:10:31: error: because type variable ‘a1’ would escape its scope This (rigid, skolem) type variable is bound by the type signature for: - foo :: (F Int ~ [a1]) => a1 -> Int + foo :: F Int ~ [a1] => a1 -> Int at PushedInAsGivens.hs:9:13-44 • In the expression: y In the first argument of ‘length’, namely ‘[x, y]’ diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.stderr b/testsuite/tests/indexed-types/should_compile/Simple14.stderr index d0582b0c98..bbbe0fbc58 100644 --- a/testsuite/tests/indexed-types/should_compile/Simple14.stderr +++ b/testsuite/tests/indexed-types/should_compile/Simple14.stderr @@ -4,11 +4,11 @@ Simple14.hs:8:8: error: ‘z0’ is untouchable inside the constraints: x ~ y bound by the type signature for: - eqE :: (x ~ y) => EQ_ z0 z0 + eqE :: x ~ y => EQ_ z0 z0 at Simple14.hs:8:8-39 ‘z’ is a rigid type variable bound by the type signature for: - eqE :: forall x y z p. EQ_ x y -> ((x ~ y) => EQ_ z z) -> p + eqE :: forall x y z p. EQ_ x y -> (x ~ y => EQ_ z z) -> p at Simple14.hs:8:8 Expected type: EQ_ z0 z0 Actual type: EQ_ z z diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr index ef6b3181e7..48d897dea0 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr @@ -1,6 +1,6 @@ SimpleFail15.hs:5:8: error: - • Illegal qualified type: (a ~ b) => t + • Illegal qualified type: a ~ b => t Perhaps you intended to use RankNTypes or Rank2Types • In the type signature: foo :: (a, b) -> (a ~ b => t) -> (a, b) diff --git a/testsuite/tests/indexed-types/should_fail/T4093a.stderr b/testsuite/tests/indexed-types/should_fail/T4093a.stderr index 8f46170339..d226122614 100644 --- a/testsuite/tests/indexed-types/should_fail/T4093a.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4093a.stderr @@ -3,11 +3,11 @@ T4093a.hs:8:8: error: • Could not deduce: e ~ () from the context: Foo e ~ Maybe e bound by the type signature for: - hang :: (Foo e ~ Maybe e) => Foo e + hang :: Foo e ~ Maybe e => Foo e at T4093a.hs:7:1-34 ‘e’ is a rigid type variable bound by the type signature for: - hang :: forall e. (Foo e ~ Maybe e) => Foo e + hang :: forall e. Foo e ~ Maybe e => Foo e at T4093a.hs:7:9 Expected type: Foo e Actual type: Maybe () diff --git a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr index 7b12afc302..476ee27198 100644 --- a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr +++ b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr @@ -3,11 +3,11 @@ TYPE SIGNATURES DataFamilyInstanceLHS.B :: MyKind DataFamilyInstanceLHS.SingA :: forall (_ :: MyKind). - (_ ~ 'A) => + _ ~ 'A => DataFamilyInstanceLHS.R:SingMyKind_ _ DataFamilyInstanceLHS.SingB :: forall (_ :: MyKind). - (_ ~ 'B) => + _ ~ 'B => DataFamilyInstanceLHS.R:SingMyKind_ _ foo :: Sing 'A TYPE CONSTRUCTORS diff --git a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr index 5b8982ba16..cd20a9bc19 100644 --- a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr +++ b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr @@ -3,11 +3,11 @@ TYPE SIGNATURES NamedWildcardInDataFamilyInstanceLHS.B :: MyKind NamedWildcardInDataFamilyInstanceLHS.SingA :: forall (_a :: MyKind). - (_a ~ 'A) => + _a ~ 'A => NamedWildcardInDataFamilyInstanceLHS.R:SingMyKind_a _a NamedWildcardInDataFamilyInstanceLHS.SingB :: forall (_a :: MyKind). - (_a ~ 'B) => + _a ~ 'B => NamedWildcardInDataFamilyInstanceLHS.R:SingMyKind_a _a TYPE CONSTRUCTORS data MyKind = A | B diff --git a/testsuite/tests/polykinds/T10503.stderr b/testsuite/tests/polykinds/T10503.stderr index 141f16fc6e..a74615cd06 100644 --- a/testsuite/tests/polykinds/T10503.stderr +++ b/testsuite/tests/polykinds/T10503.stderr @@ -3,11 +3,11 @@ T10503.hs:8:6: error: • Could not deduce: k ~ * from the context: Proxy 'KProxy ~ Proxy 'KProxy bound by the type signature for: - h :: (Proxy 'KProxy ~ Proxy 'KProxy) => r + h :: Proxy 'KProxy ~ Proxy 'KProxy => r at T10503.hs:8:6-85 ‘k’ is a rigid type variable bound by the type signature for: - h :: forall k r. ((Proxy 'KProxy ~ Proxy 'KProxy) => r) -> r + h :: forall k r. (Proxy 'KProxy ~ Proxy 'KProxy => r) -> r at T10503.hs:8:6 • In the ambiguity check for ‘h’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes diff --git a/testsuite/tests/polykinds/T7230.stderr b/testsuite/tests/polykinds/T7230.stderr index 36e333c5ec..0ca0310a00 100644 --- a/testsuite/tests/polykinds/T7230.stderr +++ b/testsuite/tests/polykinds/T7230.stderr @@ -3,8 +3,7 @@ T7230.hs:48:32: error: • Could not deduce: (x :<<= x1) ~ 'True from the context: Increasing xs ~ 'True bound by the type signature for: - crash :: (Increasing xs ~ 'True) => - SList xs -> SBool (Increasing xs) + crash :: Increasing xs ~ 'True => SList xs -> SBool (Increasing xs) at T7230.hs:47:1-68 or from: xs ~ (x : xs1) bound by a pattern with constructor: @@ -19,7 +18,7 @@ T7230.hs:48:32: error: in an equation for ‘crash’ at T7230.hs:48:17-26 Expected type: SBool (Increasing xs) - Actual type: SBool (x :<<= x1) + Actual type: SBool (x :<<= x1) • In the expression: x %:<<= y In an equation for ‘crash’: crash (SCons x (SCons y xs)) = x %:<<= y diff --git a/testsuite/tests/polykinds/T9222.stderr b/testsuite/tests/polykinds/T9222.stderr index b3d31ef6ce..b3adf5bb43 100644 --- a/testsuite/tests/polykinds/T9222.stderr +++ b/testsuite/tests/polykinds/T9222.stderr @@ -4,12 +4,12 @@ T9222.hs:13:3: error: ‘b0’ is untouchable inside the constraints: a ~ '(b0, c0) bound by the type of the constructor ‘Want’: - (a ~ '(b0, c0)) => Proxy b0 + a ~ '(b0, c0) => Proxy b0 at T9222.hs:13:3 ‘b’ is a rigid type variable bound by the type of the constructor ‘Want’: forall i1 j1 (a :: (i1, j1)) (b :: i1) (c :: j1). - ((a ~ '(b, c)) => Proxy b) -> Want a + (a ~ '(b, c) => Proxy b) -> Want a at T9222.hs:13:3 Expected type: Proxy b0 Actual type: Proxy b diff --git a/testsuite/tests/roles/should_compile/Roles13.stderr b/testsuite/tests/roles/should_compile/Roles13.stderr index e9b8f1afec..8a92c122b7 100644 --- a/testsuite/tests/roles/should_compile/Roles13.stderr +++ b/testsuite/tests/roles/should_compile/Roles13.stderr @@ -13,7 +13,7 @@ convert :: Wrap Age -> Int convert = convert1 `cast` (<Wrap Age>_R -> Roles13.N:Wrap[0] Roles13.N:Age[0] - :: (Wrap Age -> Wrap Age) ~R# (Wrap Age -> Int)) + :: ((Wrap Age -> Wrap Age) :: *) ~R# ((Wrap Age -> Int) :: *)) -- RHS size: {terms: 2, types: 0, coercions: 0} $trModule1 :: GHC.Types.TrName diff --git a/testsuite/tests/roles/should_compile/Roles3.stderr b/testsuite/tests/roles/should_compile/Roles3.stderr index ca496ed042..5bf803419f 100644 --- a/testsuite/tests/roles/should_compile/Roles3.stderr +++ b/testsuite/tests/roles/should_compile/Roles3.stderr @@ -23,7 +23,7 @@ TYPE CONSTRUCTORS COERCION AXIOMS axiom Roles3.N:C1 :: C1 a = a -> a -- Defined at Roles3.hs:6:1 axiom Roles3.N:C2 :: - C2 a b = (a ~ b) => a -> b -- Defined at Roles3.hs:9:1 + C2 a b = a ~ b => a -> b -- Defined at Roles3.hs:9:1 axiom Roles3.N:C3 :: C3 a b = a -> F3 b -> F3 b -- Defined at Roles3.hs:12:1 axiom Roles3.N:C4 :: diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr index 6abb044c8e..bff6ba544f 100644 --- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr +++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr @@ -2,7 +2,7 @@ FrozenErrorTests.hs:12:12: error: • Couldn't match type ‘Int’ with ‘Bool’ Inaccessible code in - a pattern with constructor: MkT3 :: forall a. (a ~ Bool) => T a, + a pattern with constructor: MkT3 :: forall a. a ~ Bool => T a, in a case alternative • In the pattern: MkT3 In a case alternative: MkT3 -> () diff --git a/testsuite/tests/typecheck/should_fail/T5858.stderr b/testsuite/tests/typecheck/should_fail/T5858.stderr index 7d974d88b7..08de48888a 100644 --- a/testsuite/tests/typecheck/should_fail/T5858.stderr +++ b/testsuite/tests/typecheck/should_fail/T5858.stderr @@ -1,11 +1,11 @@ T5858.hs:11:7: error: - Ambiguous type variables ‘t0’, ‘t1’ arising from a use of ‘infer’ - prevents the constraint ‘(InferOverloaded - ([t0], [t1]))’ from being solved. - Probable fix: use a type annotation to specify what ‘t0’, ‘t1’ should be. - These potential instance exist: - instance (t1 ~ String) => InferOverloaded (t1, t1) - -- Defined at T5858.hs:8:10 - In the expression: infer ([], []) - In an equation for ‘foo’: foo = infer ([], []) + • Ambiguous type variables ‘t0’, ‘t1’ arising from a use of ‘infer’ + prevents the constraint ‘(InferOverloaded + ([t0], [t1]))’ from being solved. + Probable fix: use a type annotation to specify what ‘t0’, ‘t1’ should be. + These potential instance exist: + instance t1 ~ String => InferOverloaded (t1, t1) + -- Defined at T5858.hs:8:10 + • In the expression: infer ([], []) + In an equation for ‘foo’: foo = infer ([], []) diff --git a/testsuite/tests/typecheck/should_fail/T7857.stderr b/testsuite/tests/typecheck/should_fail/T7857.stderr index 2596efb51f..ef723a703b 100644 --- a/testsuite/tests/typecheck/should_fail/T7857.stderr +++ b/testsuite/tests/typecheck/should_fail/T7857.stderr @@ -6,7 +6,7 @@ T7857.hs:8:11: error: at T7857.hs:8:1-21 The type variable ‘a0’ is ambiguous These potential instances exist: - instance [safe] (a ~ ()) => PrintfType (IO a) + instance [safe] a ~ () => PrintfType (IO a) -- Defined in ‘Text.Printf’ instance [safe] (PrintfArg a, PrintfType r) => PrintfType (a -> r) -- Defined in ‘Text.Printf’ diff --git a/testsuite/tests/typecheck/should_fail/T8392a.stderr b/testsuite/tests/typecheck/should_fail/T8392a.stderr index ba2c5e4604..df53c22bda 100644 --- a/testsuite/tests/typecheck/should_fail/T8392a.stderr +++ b/testsuite/tests/typecheck/should_fail/T8392a.stderr @@ -3,7 +3,7 @@ T8392a.hs:6:8: error: • Couldn't match type ‘Int’ with ‘Bool’ Inaccessible code in the type signature for: - foo :: (Int ~ Bool) => a -> a + foo :: Int ~ Bool => a -> a • In the ambiguity check for ‘foo’ In the type signature: foo :: (Int ~ Bool) => a -> a |