diff options
author | Richard Eisenberg <rae@richarde.dev> | 2019-07-18 12:01:55 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-09-19 09:04:03 -0400 |
commit | f594a68a5500696d94ae36425bbf4d4073aca3b2 (patch) | |
tree | b050963956c7309530f709d738dde7a25a5464eb /testsuite | |
parent | d9c6b86e922ef786411b852bd247ef5573ee7a59 (diff) | |
download | haskell-f594a68a5500696d94ae36425bbf4d4073aca3b2.tar.gz |
Use level numbers for generalisation
This fixes #15809, and is covered in
Note [Use level numbers for quantification] in TcMType.
This patch removes the "global tyvars" from the
environment, a nice little win.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/partial-sigs/should_fail/T14040a.stderr | 10 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc213.hs | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/testsuite/tests/partial-sigs/should_fail/T14040a.stderr b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr index 31e5c8c4e7..d03d0dc32b 100644 --- a/testsuite/tests/partial-sigs/should_fail/T14040a.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr @@ -1,13 +1,13 @@ T14040a.hs:34:8: error: - • Cannot apply expression of type ‘Sing wl0 - -> (forall y. p0 _0 'WeirdNil) + • Cannot apply expression of type ‘Sing wl + -> (forall y. p _0 'WeirdNil) -> (forall z (x :: z) (xs :: WeirdList (WeirdList z)). Sing x -> Sing xs - -> p0 GHC.Types.Any xs - -> p0 GHC.Types.Any ('WeirdCons x xs)) - -> p0 GHC.Types.Any wl0’ + -> p GHC.Types.Any xs + -> p GHC.Types.Any ('WeirdCons x xs)) + -> p _1 wl’ to a visible type argument ‘(WeirdList z)’ • In the sixth argument of ‘pWeirdCons’, namely ‘(elimWeirdList @(WeirdList z) @xs @p xs pWeirdNil pWeirdCons)’ diff --git a/testsuite/tests/typecheck/should_compile/tc213.hs b/testsuite/tests/typecheck/should_compile/tc213.hs index 43bba76526..d5f1ea374f 100644 --- a/testsuite/tests/typecheck/should_compile/tc213.hs +++ b/testsuite/tests/typecheck/should_compile/tc213.hs @@ -34,8 +34,14 @@ instance Ix key => Mark (ST s) (STUArray s key Bool) key where seen s = liftM (map fst . filter snd) (getAssocs s) -- traversing the hull suc^*(start) with loop detection +-- trav :: forall f f2 m store key. +-- (Foldable f, Foldable f2, Mark m store key, Monad m) +-- => (key -> f key) -> f2 key -> (key, key) -> m store trav suc start i = new i >>= \ c -> mapM_ (compo c) start >> return c - where compo c x = markQ c x >>= flip unless (visit c x) + where -- compo :: (Monad m, Mark m store' key) => store' -> key -> m () + compo c x = markQ c x >>= flip unless (visit c x) + + -- visit :: (Monad m, Mark m store' key) => store' -> key -> m () visit c x = mark c x >> mapM_ (compo c) (suc x) -- sample graph |