diff options
author | Richard Eisenberg <rae@richarde.dev> | 2020-01-15 22:49:51 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-29 09:40:14 -0400 |
commit | b8d98827d73fd3e49867cab09f9440fc8c311bfe (patch) | |
tree | 51f28143cdf9898ae5b75d08ce4a7c71b05cc8ad /testsuite | |
parent | 028abd5bf398db6d872a10342695e8e84e0827b3 (diff) | |
download | haskell-b8d98827d73fd3e49867cab09f9440fc8c311bfe.tar.gz |
Compare FunTys as if they were TyConApps.
See Note [Equality on FunTys] in TyCoRep.
Close #17675.
Close #17655, about documentation improvements included in
this patch.
Close #19677, about a further mistake around FunTy.
test cases: typecheck/should_compile/T19677
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T19677.hs | 19 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T19677.hs b/testsuite/tests/typecheck/should_compile/T19677.hs new file mode 100644 index 0000000000..1b29beb0d1 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T19677.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE ExplicitForAll, PolyKinds, DataKinds, TypeFamilies, GADTs #-} + +module T19677 where + +import GHC.Exts + +class C x where + meth :: x -> () +instance C (a -> b) where + meth _ = () + +type family Lifty throttle where + Lifty Int = LiftedRep + +data G a where + MkG :: G Int + +foo :: forall i (a :: TYPE (Lifty i)) (b :: TYPE (Lifty i)). G i -> (a -> b) -> () +foo MkG = meth diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index b6735408db..9983ff20da 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -739,6 +739,7 @@ test('T18412', normal, compile, ['']) test('T18470', normal, compile, ['']) test('T18308', normal, compile, ['']) test('T18323', normal, compile, ['']) +test('T19677', normal, compile, ['']) test('T18585', normal, compile, ['']) test('T18831', normal, compile, ['']) test('T18920', normal, compile, ['']) |