summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2020-05-05 16:46:43 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-05-13 20:04:46 -0400
commit102cfd6784d16a0d0cc8bdf42d4de4c7b8dd0190 (patch)
tree4cf0015b9dd76f8aeda5728ada2aeafae0668625 /testsuite
parentd880d6b2e48268f5ed4d3eb751fe24cc833e9221 (diff)
downloadhaskell-102cfd6784d16a0d0cc8bdf42d4de4c7b8dd0190.tar.gz
Factor out HsPatSigType for pat sigs/RULE term sigs (#16762)
This implements chunks (2) and (3) of https://gitlab.haskell.org/ghc/ghc/issues/16762#note_270170. Namely, it introduces a dedicated `HsPatSigType` AST type, which represents the types that can appear in pattern signatures and term-level `RULE` binders. Previously, these were represented with `LHsSigWcType`. Although `LHsSigWcType` is isomorphic to `HsPatSigType`, the intended semantics of the two types are slightly different, as evidenced by the fact that they have different code paths in the renamer and typechecker. See also the new `Note [Pattern signature binders and scoping]` in `GHC.Hs.Types`.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/hiefile/should_compile/hie007.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/testsuite/tests/hiefile/should_compile/hie007.hs b/testsuite/tests/hiefile/should_compile/hie007.hs
index 3f0103bf2a..a99e6340c6 100644
--- a/testsuite/tests/hiefile/should_compile/hie007.hs
+++ b/testsuite/tests/hiefile/should_compile/hie007.hs
@@ -64,3 +64,6 @@ thud f x =
(x :: a, y) :: (a, b)
where
y = (f :: a -> b) x :: b
+
+rankn :: (forall a1. a1 -> b) -> a2 -> b
+rankn (g :: forall a1. a1 -> b) x = g x :: b