diff options
author | Cale Gibbard <cgibbard@gmail.com> | 2020-11-09 16:11:45 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-12-14 13:37:09 -0500 |
commit | c696bb2f4476e0ce4071e0d91687c1fe84405599 (patch) | |
tree | dc55fdaebbcd8dbd0c1f53c80214c2996c7f3f0a /testsuite/tests/typecheck/should_fail/TyAppPat_PatternBindingExistential.hs | |
parent | 78580ba3f99565b0aecb25c4206718d4c8a52317 (diff) | |
download | haskell-c696bb2f4476e0ce4071e0d91687c1fe84405599.tar.gz |
Implement type applications in patterns
The haddock submodule is also updated so that it understands the changes
to patterns.
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/TyAppPat_PatternBindingExistential.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/TyAppPat_PatternBindingExistential.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/TyAppPat_PatternBindingExistential.hs b/testsuite/tests/typecheck/should_fail/TyAppPat_PatternBindingExistential.hs new file mode 100644 index 0000000000..bd888b3bac --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/TyAppPat_PatternBindingExistential.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE ExistentialQuantification #-} + +module Main where + +data Some = forall a. Some a + +Some @a x = Some (5 :: Integer) + +main = do + print (x :: a) |