diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-02-02 18:23:11 +0000 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-06-05 09:27:50 -0400 |
commit | 2b792facab46f7cdd09d12e79499f4e0dcd4293f (patch) | |
tree | f3bf2dffdd3c46744d3c1b0638948a1dfbd1b8f6 /testsuite/tests/ghci | |
parent | af5e3a885ddd09dd5f550552c535af3661ff3dbf (diff) | |
download | haskell-2b792facab46f7cdd09d12e79499f4e0dcd4293f.tar.gz |
Simple subsumptionwip/T17775
This patch simplifies GHC to use simple subsumption.
Ticket #17775
Implements GHC proposal #287
https://github.com/ghc-proposals/ghc-proposals/blob/master/
proposals/0287-simplify-subsumption.rst
All the motivation is described there; I will not repeat it here.
The implementation payload:
* tcSubType and friends become noticably simpler, because it no
longer uses eta-expansion when checking subsumption.
* No deeplyInstantiate or deeplySkolemise
That in turn means that some tests fail, by design; they can all
be fixed by eta expansion. There is a list of such changes below.
Implementing the patch led me into a variety of sticky corners, so
the patch includes several othe changes, some quite significant:
* I made String wired-in, so that
"foo" :: String rather than
"foo" :: [Char]
This improves error messages, and fixes #15679
* The pattern match checker relies on knowing about in-scope equality
constraints, andd adds them to the desugarer's environment using
addTyCsDs. But the co_fn in a FunBind was missed, and for some reason
simple-subsumption ends up with dictionaries there. So I added a
call to addTyCsDs. This is really part of #18049.
* I moved the ic_telescope field out of Implication and into
ForAllSkol instead. This is a nice win; just expresses the code
much better.
* There was a bug in GHC.Tc.TyCl.Instance.tcDataFamInstHeader.
We called checkDataKindSig inside tc_kind_sig, /before/
solveEqualities and zonking. Obviously wrong, easily fixed.
* solveLocalEqualitiesX: there was a whole mess in here, around
failing fast enough. I discovered a bad latent bug where we
could successfully kind-check a type signature, and use it,
but have unsolved constraints that could fill in coercion
holes in that signature -- aargh.
It's all explained in Note [Failure in local type signatures]
in GHC.Tc.Solver. Much better now.
* I fixed a serious bug in anonymous type holes. IN
f :: Int -> (forall a. a -> _) -> Int
that "_" should be a unification variable at the /outer/
level; it cannot be instantiated to 'a'. This was plain
wrong. New fields mode_lvl and mode_holes in TcTyMode,
and auxiliary data type GHC.Tc.Gen.HsType.HoleMode.
This fixes #16292, but makes no progress towards the more
ambitious #16082
* I got sucked into an enormous refactoring of the reporting of
equality errors in GHC.Tc.Errors, especially in
mkEqErr1
mkTyVarEqErr
misMatchMsg
misMatchMsgOrCND
In particular, the very tricky mkExpectedActualMsg function
is gone.
It took me a full day. But the result is far easier to understand.
(Still not easy!) This led to various minor improvements in error
output, and an enormous number of test-case error wibbles.
One particular point: for occurs-check errors I now just say
Can't match 'a' against '[a]'
rather than using the intimidating language of "occurs check".
* Pretty-printing AbsBinds
Tests review
* Eta expansions
T11305: one eta expansion
T12082: one eta expansion (undefined)
T13585a: one eta expansion
T3102: one eta expansion
T3692: two eta expansions (tricky)
T2239: two eta expansions
T16473: one eta
determ004: two eta expansions (undefined)
annfail06: two eta (undefined)
T17923: four eta expansions (a strange program indeed!)
tcrun035: one eta expansion
* Ambiguity check at higher rank. Now that we have simple
subsumption, a type like
f :: (forall a. Eq a => Int) -> Int
is no longer ambiguous, because we could write
g :: (forall a. Eq a => Int) -> Int
g = f
and it'd typecheck just fine. But f's type is a bit
suspicious, and we might want to consider making the
ambiguity check do a check on each sub-term. Meanwhile,
these tests are accepted, whereas they were previously
rejected as ambiguous:
T7220a
T15438
T10503
T9222
* Some more interesting error message wibbles
T13381: Fine: one error (Int ~ Exp Int)
rather than two (Int ~ Exp Int, Exp Int ~ Int)
T9834: Small change in error (improvement)
T10619: Improved
T2414: Small change, due to order of unification, fine
T2534: A very simple case in which a change of unification order
means we get tow unsolved constraints instead of one
tc211: bizarre impredicative tests; just accept this for now
Updates Cabal and haddock submodules.
Metric Increase:
T12150
T12234
T5837
haddock.base
Metric Decrease:
haddock.compiler
haddock.Cabal
haddock.base
Merge note: This appears to break the
`UnliftedNewtypesDifficultUnification` test. It has been marked as
broken in the interest of merging.
(cherry picked from commit 66b7b195cb3dce93ed5078b80bf568efae904cc5)
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r-- | testsuite/tests/ghci/scripts/Defer02.stderr | 20 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T10508.stderr | 7 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T12005.script | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T12447.stdout | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T16767.stdout | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T2976.stdout | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T8357.stdout | 6 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T8649.stderr | 13 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T8959b.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci012.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci051.stderr | 15 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci052.stderr | 54 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci053.stderr | 28 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci061.stderr | 14 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci064.stdout | 32 | ||||
-rw-r--r-- | testsuite/tests/ghci/should_fail/T16287.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/should_run/T13456.stdout | 4 |
17 files changed, 111 insertions, 106 deletions
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr index 0defd52b38..c25cc4b81f 100644 --- a/testsuite/tests/ghci/scripts/Defer02.stderr +++ b/testsuite/tests/ghci/scripts/Defer02.stderr @@ -1,8 +1,8 @@ Defer01.hs:11:40: warning: [-Wdeferred-type-errors (in -Wdefault)] • Couldn't match type ‘Char’ with ‘[Char]’ - Expected type: String - Actual type: Char + Expected: String + Actual: Char • In the first argument of ‘putStr’, namely ‘','’ In the second argument of ‘(>>)’, namely ‘putStr ','’ In the expression: putStr "Hello World" >> putStr ',' @@ -60,16 +60,16 @@ Defer01.hs:47:7: warning: [-Wdeferred-type-errors (in -Wdefault)] In an equation for ‘k’: k x = x Defer01.hs:50:5: warning: [-Wdeferred-type-errors (in -Wdefault)] - • Couldn't match expected type ‘IO a0’ - with actual type ‘Char -> IO ()’ + • Couldn't match expected type: IO a0 + with actual type: Char -> IO () • Probable cause: ‘putChar’ is applied to too few arguments In the first argument of ‘(>>)’, namely ‘putChar’ In the expression: putChar >> putChar 'p' In an equation for ‘l’: l = putChar >> putChar 'p' *** Exception: Defer01.hs:11:40: error: • Couldn't match type ‘Char’ with ‘[Char]’ - Expected type: String - Actual type: Char + Expected: String + Actual: Char • In the first argument of ‘putStr’, namely ‘','’ In the second argument of ‘(>>)’, namely ‘putStr ','’ In the expression: putStr "Hello World" >> putStr ',' @@ -87,8 +87,8 @@ Defer01.hs:50:5: warning: [-Wdeferred-type-errors (in -Wdefault)] <interactive>:10:11: error: • Couldn't match type ‘Bool’ with ‘Int’ - Expected type: C Int - Actual type: C Bool + Expected: C Int + Actual: C Bool • In the first argument of ‘c’, namely ‘(C2 True)’ In the first argument of ‘print’, namely ‘(c (C2 True))’ In the expression: print (c (C2 True)) @@ -140,8 +140,8 @@ 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’ - with actual type ‘Char -> IO ()’ + • Couldn't match expected type: IO a0 + with actual type: Char -> IO () • Probable cause: ‘putChar’ is applied to too few arguments In the first argument of ‘(>>)’, namely ‘putChar’ In the expression: putChar >> putChar 'p' diff --git a/testsuite/tests/ghci/scripts/T10508.stderr b/testsuite/tests/ghci/scripts/T10508.stderr index 365bf9fcae..f7931e48e2 100644 --- a/testsuite/tests/ghci/scripts/T10508.stderr +++ b/testsuite/tests/ghci/scripts/T10508.stderr @@ -1,8 +1,9 @@ <interactive>:1:8: error: - • Couldn't match type ‘a0 -> a0’ with ‘[Char]’ - Expected type: IO Prelude.String - Actual type: IO (a0 -> a0) + • Couldn't match type: a0 -> a0 + with: [Char] + Expected: IO Prelude.String + Actual: IO (a0 -> a0) • In the expression: return id In the second argument of ‘(.)’, namely ‘(\ _ -> return id)’ In the expression: diff --git a/testsuite/tests/ghci/scripts/T12005.script b/testsuite/tests/ghci/scripts/T12005.script index a86e7d5e8e..4be674ede8 100644 --- a/testsuite/tests/ghci/scripts/T12005.script +++ b/testsuite/tests/ghci/scripts/T12005.script @@ -1,8 +1,8 @@ -:set -XKindSignatures -XRank2Types -XConstraintKinds -XAllowAmbiguousTypes -XInstanceSigs +:set -XKindSignatures -XRank2Types -XConstraintKinds -XAllowAmbiguousTypes import Data.Kind class Defer (p :: Constraint) where defer :: (p => r) -> r -instance Defer () where defer :: r -> r; defer = id +instance Defer () where defer x = x :i Defer diff --git a/testsuite/tests/ghci/scripts/T12447.stdout b/testsuite/tests/ghci/scripts/T12447.stdout index 7a64e1546d..6c469eeef3 100644 --- a/testsuite/tests/ghci/scripts/T12447.stdout +++ b/testsuite/tests/ghci/scripts/T12447.stdout @@ -1,3 +1,3 @@ deferEither @(_ ~ _) - :: (Typeable _1, Typeable _2) => - proxy (_1 ~ _2) -> ((_1 ~ _2) => r) -> Either String r + :: (Typeable w1, Typeable w2) => + proxy (w1 ~ w2) -> ((w1 ~ w2) => r) -> Either String r diff --git a/testsuite/tests/ghci/scripts/T16767.stdout b/testsuite/tests/ghci/scripts/T16767.stdout index 340ed6ee80..5cd96f96a7 100644 --- a/testsuite/tests/ghci/scripts/T16767.stdout +++ b/testsuite/tests/ghci/scripts/T16767.stdout @@ -1,2 +1,2 @@ -'Proxy @_ :: forall {k} {_ :: k}. Proxy @{k} _ -= 'Proxy @{k} @_ +'Proxy @_ :: forall {k} {w :: k}. Proxy @{k} w += 'Proxy @{k} @w diff --git a/testsuite/tests/ghci/scripts/T2976.stdout b/testsuite/tests/ghci/scripts/T2976.stdout index 9c977a2cb3..8d8edae907 100644 --- a/testsuite/tests/ghci/scripts/T2976.stdout +++ b/testsuite/tests/ghci/scripts/T2976.stdout @@ -1,6 +1,6 @@ test :: Int = 0 test = 0 test :: Int = 0 -test :: [Char] = _ +test :: String = _ test = "test" -test :: [Char] = "test" +test :: String = "test" diff --git a/testsuite/tests/ghci/scripts/T8357.stdout b/testsuite/tests/ghci/scripts/T8357.stdout index 7975d1f1a1..2f2cf22b47 100644 --- a/testsuite/tests/ghci/scripts/T8357.stdout +++ b/testsuite/tests/ghci/scripts/T8357.stdout @@ -1,3 +1,3 @@ -foo :: Rec '["foo" ::: [Char]] -bar :: Rec '["bar" ::: [Char]] -both :: Rec '["foo" ::: [Char], "bar" ::: [Char]] +foo :: Rec '["foo" ::: String] +bar :: Rec '["bar" ::: String] +both :: Rec '["foo" ::: [Char], "bar" ::: String] diff --git a/testsuite/tests/ghci/scripts/T8649.stderr b/testsuite/tests/ghci/scripts/T8649.stderr index aa40d50c2e..96afa36a54 100644 --- a/testsuite/tests/ghci/scripts/T8649.stderr +++ b/testsuite/tests/ghci/scripts/T8649.stderr @@ -1,9 +1,8 @@ <interactive>:4:4: error: - Couldn't match expected type ‘Ghci1.X’ - with actual type ‘X’ - NB: ‘X’ is defined at <interactive>:3:1-25 - ‘Ghci1.X’ is defined at <interactive>:1:1-14 - In the first argument of ‘f’, namely ‘(Y 3)’ - In the expression: f (Y 3) - In an equation for ‘it’: it = f (Y 3) + • Couldn't match expected type ‘Ghci1.X’ with actual type ‘X’ + NB: ‘Ghci1.X’ is defined at <interactive>:1:1-14 + ‘X’ is defined at <interactive>:3:1-25 + • In the first argument of ‘f’, namely ‘(Y 3)’ + In the expression: f (Y 3) + In an equation for ‘it’: it = f (Y 3) diff --git a/testsuite/tests/ghci/scripts/T8959b.stderr b/testsuite/tests/ghci/scripts/T8959b.stderr index a814d2e5cb..971261ba40 100644 --- a/testsuite/tests/ghci/scripts/T8959b.stderr +++ b/testsuite/tests/ghci/scripts/T8959b.stderr @@ -10,7 +10,7 @@ T8959b.hs:8:7: error: In an equation for ‘bar’: bar = proc x -> do return ⤙ x T8959b.hs:10:7: error: - • Couldn't match expected type ‘(∀ a2. a2 → a2) → a1’ + • Couldn't match expected type ‘(∀ a. a → a) → a1’ with actual type ‘()’ • In the expression: () ∷ (∀ a. a → a) → a In an equation for ‘baz’: baz = () ∷ (∀ a. a → a) → a diff --git a/testsuite/tests/ghci/scripts/ghci012.stdout b/testsuite/tests/ghci/scripts/ghci012.stdout index 0fc695c4d1..32ceac8b06 100644 --- a/testsuite/tests/ghci/scripts/ghci012.stdout +++ b/testsuite/tests/ghci/scripts/ghci012.stdout @@ -1 +1 @@ -($$$) :: [a -> c] -> [a] -> [c] -- Defined at <interactive>:1:8 +($$$) :: [b -> c] -> [b] -> [c] -- Defined at <interactive>:1:8 diff --git a/testsuite/tests/ghci/scripts/ghci051.stderr b/testsuite/tests/ghci/scripts/ghci051.stderr index 6d28081344..9407837580 100644 --- a/testsuite/tests/ghci/scripts/ghci051.stderr +++ b/testsuite/tests/ghci/scripts/ghci051.stderr @@ -1,10 +1,9 @@ <interactive>:6:9: error: - Couldn't match type ‘T’ - with ‘Ghci1.T’ - NB: ‘Ghci1.T’ is defined at <interactive>:2:1-14 - ‘T’ is defined at <interactive>:5:1-16 - Expected type: T' - Actual type: T - In the expression: C :: T' - In an equation for ‘c’: c = C :: T' + • Couldn't match type ‘T’ with ‘Ghci1.T’ + Expected: T' + Actual: T + NB: ‘Ghci1.T’ is defined at <interactive>:2:1-14 + ‘T’ is defined at <interactive>:5:1-16 + • In the expression: C :: T' + In an equation for ‘c’: c = C :: T' diff --git a/testsuite/tests/ghci/scripts/ghci052.stderr b/testsuite/tests/ghci/scripts/ghci052.stderr index 224726f822..047ab5e966 100644 --- a/testsuite/tests/ghci/scripts/ghci052.stderr +++ b/testsuite/tests/ghci/scripts/ghci052.stderr @@ -1,35 +1,35 @@ <interactive>:8:4: error: - Couldn't match expected type ‘Ghci1.Planet’ - with actual type ‘Planet’ - NB: ‘Planet’ is defined at <interactive>:7:1-36 - ‘Ghci1.Planet’ is defined at <interactive>:4:1-37 - In the first argument of ‘pn’, namely ‘Mercury’ - In the expression: pn Mercury - In an equation for ‘it’: it = pn Mercury + • Couldn't match expected type ‘Ghci1.Planet’ + with actual type ‘Planet’ + NB: ‘Ghci1.Planet’ is defined at <interactive>:4:1-37 + ‘Planet’ is defined at <interactive>:7:1-36 + • In the first argument of ‘pn’, namely ‘Mercury’ + In the expression: pn Mercury + In an equation for ‘it’: it = pn Mercury <interactive>:9:4: error: - Couldn't match expected type ‘Ghci1.Planet’ - with actual type ‘Planet’ - NB: ‘Planet’ is defined at <interactive>:7:1-36 - ‘Ghci1.Planet’ is defined at <interactive>:4:1-37 - In the first argument of ‘pn’, namely ‘Venus’ - In the expression: pn Venus - In an equation for ‘it’: it = pn Venus + • Couldn't match expected type ‘Ghci1.Planet’ + with actual type ‘Planet’ + NB: ‘Ghci1.Planet’ is defined at <interactive>:4:1-37 + ‘Planet’ is defined at <interactive>:7:1-36 + • In the first argument of ‘pn’, namely ‘Venus’ + In the expression: pn Venus + In an equation for ‘it’: it = pn Venus <interactive>:10:4: error: - Couldn't match expected type ‘Ghci1.Planet’ - with actual type ‘Planet’ - NB: ‘Planet’ is defined at <interactive>:7:1-36 - ‘Ghci1.Planet’ is defined at <interactive>:4:1-37 - In the first argument of ‘pn’, namely ‘Mars’ - In the expression: pn Mars - In an equation for ‘it’: it = pn Mars + • Couldn't match expected type ‘Ghci1.Planet’ + with actual type ‘Planet’ + NB: ‘Ghci1.Planet’ is defined at <interactive>:4:1-37 + ‘Planet’ is defined at <interactive>:7:1-36 + • In the first argument of ‘pn’, namely ‘Mars’ + In the expression: pn Mars + In an equation for ‘it’: it = pn Mars <interactive>:12:44: error: - Couldn't match expected type ‘Planet’ - with actual type ‘Ghci1.Planet’ - NB: ‘Ghci1.Planet’ is defined at <interactive>:4:1-37 - ‘Planet’ is defined at <interactive>:7:1-36 - In the pattern: Earth - In an equation for ‘pn’: pn Earth = "E" + • Couldn't match expected type ‘Planet’ + with actual type ‘Ghci1.Planet’ + NB: ‘Planet’ is defined at <interactive>:7:1-36 + ‘Ghci1.Planet’ is defined at <interactive>:4:1-37 + • In the pattern: Earth + In an equation for ‘pn’: pn Earth = "E" diff --git a/testsuite/tests/ghci/scripts/ghci053.stderr b/testsuite/tests/ghci/scripts/ghci053.stderr index 76d5ae2548..d2cd0a6a68 100644 --- a/testsuite/tests/ghci/scripts/ghci053.stderr +++ b/testsuite/tests/ghci/scripts/ghci053.stderr @@ -1,18 +1,18 @@ <interactive>:9:12: error: - Couldn't match expected type ‘Ghci1.Planet’ - with actual type ‘Planet’ - NB: ‘Planet’ is defined at <interactive>:7:1-41 - ‘Ghci1.Planet’ is defined at <interactive>:4:1-49 - In the second argument of ‘(==)’, namely ‘Mercury’ - In the expression: mercury == Mercury - In an equation for ‘it’: it = mercury == Mercury + • Couldn't match expected type ‘Ghci1.Planet’ + with actual type ‘Planet’ + NB: ‘Ghci1.Planet’ is defined at <interactive>:4:1-49 + ‘Planet’ is defined at <interactive>:7:1-41 + • In the second argument of ‘(==)’, namely ‘Mercury’ + In the expression: mercury == Mercury + In an equation for ‘it’: it = mercury == Mercury <interactive>:11:10: error: - Couldn't match expected type ‘Planet’ - with actual type ‘Ghci1.Planet’ - NB: ‘Ghci1.Planet’ is defined at <interactive>:4:1-49 - ‘Planet’ is defined at <interactive>:7:1-41 - In the second argument of ‘(==)’, namely ‘Earth’ - In the expression: Venus == Earth - In an equation for ‘it’: it = Venus == Earth + • Couldn't match expected type ‘Planet’ + with actual type ‘Ghci1.Planet’ + NB: ‘Planet’ is defined at <interactive>:7:1-41 + ‘Ghci1.Planet’ is defined at <interactive>:4:1-49 + • In the second argument of ‘(==)’, namely ‘Earth’ + In the expression: Venus == Earth + In an equation for ‘it’: it = Venus == Earth diff --git a/testsuite/tests/ghci/scripts/ghci061.stderr b/testsuite/tests/ghci/scripts/ghci061.stderr index 1ba00c5609..27dac2cb77 100644 --- a/testsuite/tests/ghci/scripts/ghci061.stderr +++ b/testsuite/tests/ghci/scripts/ghci061.stderr @@ -1,16 +1,18 @@ <interactive>:1:2: error: - • Couldn't match type ‘IO String’ with ‘Int -> IO String’ - Expected type: [String] -> Int -> IO String - Actual type: [String] -> IO String + • Couldn't match type: IO String + with: Int -> IO String + Expected: [String] -> Int -> IO String + Actual: [String] -> IO String • In the expression: (two_args) :: [String] -> Int -> IO String In an equation for ‘_compileParsedExpr’: _compileParsedExpr = (two_args) :: [String] -> Int -> IO String <interactive>:1:2: error: - • Couldn't match type ‘IO String’ with ‘Int -> IO String’ - Expected type: [String] -> Int -> IO String - Actual type: [String] -> IO String + • Couldn't match type: IO String + with: Int -> IO String + Expected: [String] -> Int -> IO String + Actual: [String] -> IO String • In the expression: (two_args) :: [String] -> Int -> IO String In an equation for ‘_compileParsedExpr’: _compileParsedExpr = (two_args) :: [String] -> Int -> IO String diff --git a/testsuite/tests/ghci/scripts/ghci064.stdout b/testsuite/tests/ghci/scripts/ghci064.stdout index e3fe5a9804..9190a68e67 100644 --- a/testsuite/tests/ghci/scripts/ghci064.stdout +++ b/testsuite/tests/ghci/scripts/ghci064.stdout @@ -6,25 +6,25 @@ instance GHC.Base.MonadPlus Maybe -- Defined in ‘GHC.Base’ instance MonadFail Maybe -- Defined in ‘Control.Monad.Fail’ instance Foldable Maybe -- Defined in ‘Data.Foldable’ instance Traversable Maybe -- Defined in ‘Data.Traversable’ -instance Eq _ => Eq (Maybe _) -- Defined in ‘GHC.Maybe’ -instance Semigroup _ => Monoid (Maybe _) -- Defined in ‘GHC.Base’ -instance Ord _ => Ord (Maybe _) -- Defined in ‘GHC.Maybe’ -instance Semigroup _ => Semigroup (Maybe _) +instance Eq w => Eq (Maybe w) -- Defined in ‘GHC.Maybe’ +instance Semigroup w => Monoid (Maybe w) -- Defined in ‘GHC.Base’ +instance Ord w => Ord (Maybe w) -- Defined in ‘GHC.Maybe’ +instance Semigroup w => Semigroup (Maybe w) -- Defined in ‘GHC.Base’ -instance Show _ => Show (Maybe _) -- Defined in ‘GHC.Show’ -instance Read _ => Read (Maybe _) -- Defined in ‘GHC.Read’ -instance GHC.Generics.Generic (Maybe _) +instance Show w => Show (Maybe w) -- Defined in ‘GHC.Show’ +instance Read w => Read (Maybe w) -- Defined in ‘GHC.Read’ +instance GHC.Generics.Generic (Maybe w) -- Defined in ‘GHC.Generics’ -instance GHC.Generics.SingKind _ => GHC.Generics.SingKind (Maybe _) +instance GHC.Generics.SingKind w => GHC.Generics.SingKind (Maybe w) -- Defined in ‘GHC.Generics’ -instance Eq _ => Eq [_] -- Defined in ‘GHC.Classes’ -instance Monoid [_] -- Defined in ‘GHC.Base’ -instance Ord _ => Ord [_] -- Defined in ‘GHC.Classes’ -instance Semigroup [_] -- Defined in ‘GHC.Base’ -instance Show _ => Show [_] -- Defined in ‘GHC.Show’ -instance Read _ => Read [_] -- Defined in ‘GHC.Read’ -instance GHC.Generics.Generic [_] -- Defined in ‘GHC.Generics’ -instance [safe] MyShow _ => MyShow [_] +instance Eq w => Eq [w] -- Defined in ‘GHC.Classes’ +instance Monoid [w] -- Defined in ‘GHC.Base’ +instance Ord w => Ord [w] -- Defined in ‘GHC.Classes’ +instance Semigroup [w] -- Defined in ‘GHC.Base’ +instance Show w => Show [w] -- Defined in ‘GHC.Show’ +instance Read w => Read [w] -- Defined in ‘GHC.Read’ +instance GHC.Generics.Generic [w] -- Defined in ‘GHC.Generics’ +instance [safe] MyShow w => MyShow [w] -- Defined at ghci064.hs:7:10 instance Monoid [T] -- Defined in ‘GHC.Base’ instance Semigroup [T] -- Defined in ‘GHC.Base’ diff --git a/testsuite/tests/ghci/should_fail/T16287.stderr b/testsuite/tests/ghci/should_fail/T16287.stderr index 8b0f882ab7..df162c1b1b 100644 --- a/testsuite/tests/ghci/should_fail/T16287.stderr +++ b/testsuite/tests/ghci/should_fail/T16287.stderr @@ -4,6 +4,8 @@ <interactive>:1:4: error: • Expected kind ‘forall k. k’, but ‘F2’ has kind ‘k0’ + Cannot instantiate unification variable ‘k0’ + with a kind involving polytypes: forall k. k • In the first argument of ‘T2’, namely ‘F2’ In the type ‘T2 F2’ @@ -12,6 +14,8 @@ <interactive>:1:11: error: • Expected kind ‘forall k. k’, but ‘F2’ has kind ‘k0’ + Cannot instantiate unification variable ‘k0’ + with a kind involving polytypes: forall k. k • In the first argument of ‘T2’, namely ‘F2’ In the first argument of ‘Maybe’, namely ‘(T2 F2)’ In the type ‘Maybe (T2 F2)’ diff --git a/testsuite/tests/ghci/should_run/T13456.stdout b/testsuite/tests/ghci/should_run/T13456.stdout index 8bfc0283fd..7d354f4355 100644 --- a/testsuite/tests/ghci/should_run/T13456.stdout +++ b/testsuite/tests/ghci/should_run/T13456.stdout @@ -3,8 +3,8 @@ macro 'type' overwrites builtin command. Use ':def!' to overwrite. macro 'ty' overwrites builtin command. Use ':def!' to overwrite. I'm a macro I'm a macro -macro :: p -> IO [Char] -macro :: p -> IO [Char] +macro :: p -> IO String +macro :: p -> IO String macro 'test' is already defined. Use ':def!' to overwrite. the following macros are defined: test |