diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-09-07 11:34:37 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-08 15:43:16 -0400 |
commit | 44472daf500bf862921e89ad45c9741a07a64f61 (patch) | |
tree | fc904a7a9acbd407a00d4f6c93ca222cfdbc42fb /testsuite | |
parent | d7b2f799469a969ad7a2535be57f105186946c40 (diff) | |
download | haskell-44472daf500bf862921e89ad45c9741a07a64f61.tar.gz |
Make the forall-or-nothing rule only apply to invisible foralls (#18660)
This fixes #18660 by changing `isLHsForAllTy` to
`isLHsInvisForAllTy`, which is sufficient to make the
`forall`-or-nothing rule only apply to invisible `forall`s. I also
updated some related documentation and Notes while I was in the
neighborhood.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/dependent/should_compile/T18660.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/dependent/should_compile/all.T | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/dependent/should_compile/T18660.hs b/testsuite/tests/dependent/should_compile/T18660.hs new file mode 100644 index 0000000000..e28915d9d6 --- /dev/null +++ b/testsuite/tests/dependent/should_compile/T18660.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE StandaloneKindSignatures #-} +module T18660 where + +type F :: forall a -> b -> b +type F x y = y diff --git a/testsuite/tests/dependent/should_compile/all.T b/testsuite/tests/dependent/should_compile/all.T index 6cc9f12bca..b89c1279cc 100644 --- a/testsuite/tests/dependent/should_compile/all.T +++ b/testsuite/tests/dependent/should_compile/all.T @@ -66,3 +66,4 @@ test('T16326_Compile2', normal, compile, ['']) test('T16391a', normal, compile, ['']) test('T16344b', normal, compile, ['']) test('T16347', normal, compile, ['']) +test('T18660', normal, compile, ['']) |