diff options
Diffstat (limited to 'testsuite/tests/ghc-api')
-rw-r--r-- | testsuite/tests/ghc-api/annotations/Makefile | 4 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/annotations/T16230.stdout | 66 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/annotations/Test16230.hs | 23 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/annotations/all.T | 3 |
4 files changed, 95 insertions, 1 deletions
diff --git a/testsuite/tests/ghc-api/annotations/Makefile b/testsuite/tests/ghc-api/annotations/Makefile index 2478f29ff0..f7a66f41bb 100644 --- a/testsuite/tests/ghc-api/annotations/Makefile +++ b/testsuite/tests/ghc-api/annotations/Makefile @@ -149,3 +149,7 @@ T15303: .PHONY: T16212 T16212: $(CHECK_API_ANNOTATIONS) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16212.hs + +.PHONY: T16230 +T16230: + $(CHECK_API_ANNOTATIONS) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16230.hs diff --git a/testsuite/tests/ghc-api/annotations/T16230.stdout b/testsuite/tests/ghc-api/annotations/T16230.stdout new file mode 100644 index 0000000000..af1d96395e --- /dev/null +++ b/testsuite/tests/ghc-api/annotations/T16230.stdout @@ -0,0 +1,66 @@ +---Unattached Annotation Problems (should be empty list)--- +[] +---Ann before enclosing span problem (should be empty list)--- +[ + +] + +---Annotations----------------------- +-- SrcSpan the annotation is attached to, AnnKeywordId, +-- list of locations the keyword item appears in +[ +((Test16230.hs:1:1,AnnModule), [Test16230.hs:7:1-6]), +((Test16230.hs:1:1,AnnWhere), [Test16230.hs:7:28-32]), +((Test16230.hs:9:1-17,AnnImport), [Test16230.hs:9:1-6]), +((Test16230.hs:9:1-17,AnnSemi), [Test16230.hs:11:1]), +((Test16230.hs:11:1-11,AnnData), [Test16230.hs:11:1-4]), +((Test16230.hs:11:1-11,AnnFamily), [Test16230.hs:11:6-11]), +((Test16230.hs:11:1-11,AnnSemi), [Test16230.hs:12:1]), +((Test16230.hs:12:1-52,AnnData), [Test16230.hs:12:1-4]), +((Test16230.hs:12:1-52,AnnDot), [Test16230.hs:12:33]), +((Test16230.hs:12:1-52,AnnEqual), [Test16230.hs:12:48]), +((Test16230.hs:12:1-52,AnnForall), [Test16230.hs:12:15-20]), +((Test16230.hs:12:1-52,AnnInstance), [Test16230.hs:12:6-13]), +((Test16230.hs:12:1-52,AnnSemi), [Test16230.hs:14:1]), +((Test16230.hs:12:22-32,AnnCloseP), [Test16230.hs:12:32]), +((Test16230.hs:12:22-32,AnnDcolon), [Test16230.hs:12:25-26]), +((Test16230.hs:12:22-32,AnnOpenP), [Test16230.hs:12:22]), +((Test16230.hs:12:38-46,AnnCloseP), [Test16230.hs:12:46]), +((Test16230.hs:12:38-46,AnnOpenP), [Test16230.hs:12:38]), +((Test16230.hs:(14,1)-(15,13),AnnClass), [Test16230.hs:14:1-5]), +((Test16230.hs:(14,1)-(15,13),AnnSemi), [Test16230.hs:17:1]), +((Test16230.hs:(14,1)-(15,13),AnnWhere), [Test16230.hs:14:11-15]), +((Test16230.hs:15:3-13,AnnType), [Test16230.hs:15:3-6]), +((Test16230.hs:(17,1)-(18,31),AnnInstance), [Test16230.hs:17:1-8]), +((Test16230.hs:(17,1)-(18,31),AnnSemi), [Test16230.hs:21:1]), +((Test16230.hs:(17,1)-(18,31),AnnWhere), [Test16230.hs:17:26-30]), +((Test16230.hs:17:10-24,AnnDot), [Test16230.hs:17:18]), +((Test16230.hs:17:10-24,AnnForall), [Test16230.hs:17:10-15]), +((Test16230.hs:17:22-24,AnnCloseS), [Test16230.hs:17:24]), +((Test16230.hs:17:22-24,AnnOpenS), [Test16230.hs:17:22]), +((Test16230.hs:18:3-31,AnnDot), [Test16230.hs:18:16]), +((Test16230.hs:18:3-31,AnnEqual), [Test16230.hs:18:27]), +((Test16230.hs:18:3-31,AnnForall), [Test16230.hs:18:8-13]), +((Test16230.hs:18:3-31,AnnType), [Test16230.hs:18:3-6]), +((Test16230.hs:18:8-31,AnnDot), [Test16230.hs:18:16]), +((Test16230.hs:18:8-31,AnnEqual), [Test16230.hs:18:27]), +((Test16230.hs:18:8-31,AnnForall), [Test16230.hs:18:8-13]), +((Test16230.hs:18:21-23,AnnCloseS), [Test16230.hs:18:23]), +((Test16230.hs:18:21-23,AnnOpenS), [Test16230.hs:18:21]), +((Test16230.hs:21:1-17,AnnFamily), [Test16230.hs:21:6-11]), +((Test16230.hs:21:1-17,AnnSemi), [Test16230.hs:24:1]), +((Test16230.hs:21:1-17,AnnType), [Test16230.hs:21:1-4]), +((Test16230.hs:21:1-17,AnnWhere), [Test16230.hs:21:19-23]), +((Test16230.hs:22:3-38,AnnDot), [Test16230.hs:22:13]), +((Test16230.hs:22:3-38,AnnEqual), [Test16230.hs:22:31]), +((Test16230.hs:22:3-38,AnnForall), [Test16230.hs:22:3-8]), +((Test16230.hs:22:3-38,AnnSemi), [Test16230.hs:23:3]), +((Test16230.hs:22:17-19,AnnCloseS), [Test16230.hs:22:19]), +((Test16230.hs:22:17-19,AnnOpenS), [Test16230.hs:22:17]), +((Test16230.hs:22:21-29,AnnCloseP), [Test16230.hs:22:29]), +((Test16230.hs:22:21-29,AnnOpenP), [Test16230.hs:22:21]), +((Test16230.hs:23:3-36,AnnDot), [Test16230.hs:23:11]), +((Test16230.hs:23:3-36,AnnEqual), [Test16230.hs:23:31]), +((Test16230.hs:23:3-36,AnnForall), [Test16230.hs:23:3-8]), +((<no location info>,AnnEofPos), [Test16230.hs:24:1]) +] diff --git a/testsuite/tests/ghc-api/annotations/Test16230.hs b/testsuite/tests/ghc-api/annotations/Test16230.hs new file mode 100644 index 0000000000..e231878464 --- /dev/null +++ b/testsuite/tests/ghc-api/annotations/Test16230.hs @@ -0,0 +1,23 @@ +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE ExplicitForAll #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE DataKinds #-} +module MoreExplicitForalls where + +import Data.Proxy + +data family F1 a +data instance forall (x :: Bool). F1 (Proxy x) = MkF + +class C a where + type F2 a b + +instance forall a. C [a] where + type forall b. F2 [a] b = Int + + +type family G a b where + forall x y. G [x] (Proxy y) = Double + forall z. G z z = Bool diff --git a/testsuite/tests/ghc-api/annotations/all.T b/testsuite/tests/ghc-api/annotations/all.T index 212e218ccb..e4413f7924 100644 --- a/testsuite/tests/ghc-api/annotations/all.T +++ b/testsuite/tests/ghc-api/annotations/all.T @@ -59,6 +59,7 @@ test('T13163', [extra_files(['Test13163.hs']), ignore_stderr], makefile_test, ['T13163']) test('T15303', [extra_files(['Test15303.hs']), ignore_stderr], makefile_test, ['T15303']) -# Stricter tests from trac #16217 now causes this to fail. Will be fixed for trac #16212 test('T16212', [expect_broken(16212),extra_files(['Test16212.hs']), ignore_stderr], makefile_test, ['T16212']) +test('T16230', [extra_files(['Test16230.hs']), + ignore_stderr], makefile_test, ['T16230']) |