Commit 04bb8736 authored by Richard Eisenberg's avatar Richard Eisenberg Committed by Ben Gamari

Fix #13407 by suppressing invisibles better.

Previously, the iface-invisible-suppresser assumed that all
invisible things are up front. Not true!

test case: ghci/scripts/T13407
parent b9776308
......@@ -325,9 +325,9 @@ suppressIfaceInvisibles dflags tys xs
where
suppress _ [] = []
suppress [] a = a
suppress (k:ks) a@(_:xs)
| isInvisibleTyConBinder k = suppress ks xs
| otherwise = a
suppress (k:ks) (x:xs)
| isInvisibleTyConBinder k = suppress ks xs
| otherwise = x : suppress ks xs
stripIfaceInvisVars :: DynFlags -> [IfaceTyConBinder] -> [IfaceTyConBinder]
stripIfaceInvisVars dflags tyvars
......
:set -XTypeInType -XRankNTypes
import Data.Kind
data Foo :: (* -> *) -> (forall k. k -> *)
:info Foo
type role Foo phantom phantom
data Foo (a :: * -> *) (c :: k)
-- Defined at <interactive>:3:1
......@@ -257,3 +257,4 @@ test('GhciCurDir', normal, ghci_script, ['GhciCurDir.script'])
test('T13591', expect_broken(13591), ghci_script, ['T13591.script'])
test('T13699', normal, ghci_script, ['T13699.script'])
test('T13988', normal, ghci_script, ['T13988.script'])
test('T13407', normal, ghci_script, ['T13407.script'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment