summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/parser')
-rw-r--r--testsuite/tests/parser/should_compile/T23315/Makefile18
-rw-r--r--testsuite/tests/parser/should_compile/T23315/Setup.hs2
-rw-r--r--testsuite/tests/parser/should_compile/T23315/T23315.cabal10
-rw-r--r--testsuite/tests/parser/should_compile/T23315/T23315.hsig4
-rw-r--r--testsuite/tests/parser/should_compile/T23315/T23315.stderr112
-rw-r--r--testsuite/tests/parser/should_compile/T23315/all.T3
6 files changed, 149 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_compile/T23315/Makefile b/testsuite/tests/parser/should_compile/T23315/Makefile
new file mode 100644
index 0000000000..879e49d09f
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/T23315/Makefile
@@ -0,0 +1,18 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+SETUP = ./Setup -v0
+
+T23315: clean
+ $(MAKE) clean
+ '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make Setup
+ $(SETUP) clean
+ $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)'
+ $(SETUP) build 1>&2
+ifneq "$(CLEANUP)" ""
+ $(MAKE) clean
+endif
+
+clean :
+ $(RM) -r */dist Setup$(exeext) *.o *.hi
diff --git a/testsuite/tests/parser/should_compile/T23315/Setup.hs b/testsuite/tests/parser/should_compile/T23315/Setup.hs
new file mode 100644
index 0000000000..bf6890196c
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/T23315/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain \ No newline at end of file
diff --git a/testsuite/tests/parser/should_compile/T23315/T23315.cabal b/testsuite/tests/parser/should_compile/T23315/T23315.cabal
new file mode 100644
index 0000000000..a654745c6d
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/T23315/T23315.cabal
@@ -0,0 +1,10 @@
+name: T23315
+version: 0.1.0.0
+build-type: Simple
+cabal-version: 2.0
+
+library
+ signatures: T23315
+ build-depends: base >= 4.3 && < 5
+ default-language: Haskell2010
+ ghc-options: -Wall -haddock -ddump-parsed-ast
diff --git a/testsuite/tests/parser/should_compile/T23315/T23315.hsig b/testsuite/tests/parser/should_compile/T23315/T23315.hsig
new file mode 100644
index 0000000000..c49390e642
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/T23315/T23315.hsig
@@ -0,0 +1,4 @@
+signature T23315 where
+-- | My unit
+a :: ()
+-- ^ More docs
diff --git a/testsuite/tests/parser/should_compile/T23315/T23315.stderr b/testsuite/tests/parser/should_compile/T23315/T23315.stderr
new file mode 100644
index 0000000000..1cc94f80b8
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/T23315/T23315.stderr
@@ -0,0 +1,112 @@
+
+==================== Parser AST ====================
+
+(L
+ { T23315.hsig:1:1 }
+ (HsModule
+ (XModulePs
+ (EpAnn
+ (Anchor
+ { T23315.hsig:1:1 }
+ (UnchangedAnchor))
+ (AnnsModule
+ [(AddEpAnn AnnSignature (EpaSpan { T23315.hsig:1:1-9 }))
+ ,(AddEpAnn AnnWhere (EpaSpan { T23315.hsig:1:18-22 }))]
+ []
+ (Nothing))
+ (EpaComments
+ []))
+ (VirtualBraces
+ (1))
+ (Nothing)
+ (Nothing))
+ (Just
+ (L
+ (SrcSpanAnn (EpAnnNotUsed) { T23315.hsig:1:11-16 })
+ {ModuleName: T23315}))
+ (Nothing)
+ []
+ [(L
+ (SrcSpanAnn (EpAnnNotUsed) { T23315.hsig:2:1-12 })
+ (DocD
+ (NoExtField)
+ (DocCommentNext
+ (L
+ { T23315.hsig:2:1-12 }
+ (WithHsDocIdentifiers
+ (MultiLineDocString
+ (HsDocStringNext)
+ (:|
+ (L
+ { T23315.hsig:2:5-12 }
+ (HsDocStringChunk
+ " My unit"))
+ []))
+ [])))))
+ ,(L
+ (SrcSpanAnn (EpAnn
+ (Anchor
+ { T23315.hsig:3:1-7 }
+ (UnchangedAnchor))
+ (AnnListItem
+ [])
+ (EpaComments
+ [])) { T23315.hsig:3:1-7 })
+ (SigD
+ (NoExtField)
+ (TypeSig
+ (EpAnn
+ (Anchor
+ { T23315.hsig:3:1 }
+ (UnchangedAnchor))
+ (AnnSig
+ (AddEpAnn AnnDcolon (EpaSpan { T23315.hsig:3:3-4 }))
+ [])
+ (EpaComments
+ []))
+ [(L
+ (SrcSpanAnn (EpAnnNotUsed) { T23315.hsig:3:1 })
+ (Unqual
+ {OccName: a}))]
+ (HsWC
+ (NoExtField)
+ (L
+ (SrcSpanAnn (EpAnnNotUsed) { T23315.hsig:3:6-7 })
+ (HsSig
+ (NoExtField)
+ (HsOuterImplicit
+ (NoExtField))
+ (L
+ (SrcSpanAnn (EpAnnNotUsed) { T23315.hsig:3:6-7 })
+ (HsTupleTy
+ (EpAnn
+ (Anchor
+ { T23315.hsig:3:6 }
+ (UnchangedAnchor))
+ (AnnParen
+ (AnnParens)
+ (EpaSpan { T23315.hsig:3:6 })
+ (EpaSpan { T23315.hsig:3:7 }))
+ (EpaComments
+ []))
+ (HsBoxedOrConstraintTuple)
+ []))))))))
+ ,(L
+ (SrcSpanAnn (EpAnnNotUsed) { T23315.hsig:4:1-14 })
+ (DocD
+ (NoExtField)
+ (DocCommentPrev
+ (L
+ { T23315.hsig:4:1-14 }
+ (WithHsDocIdentifiers
+ (MultiLineDocString
+ (HsDocStringPrevious)
+ (:|
+ (L
+ { T23315.hsig:4:5-14 }
+ (HsDocStringChunk
+ " More docs"))
+ []))
+ [])))))]))
+
+
diff --git a/testsuite/tests/parser/should_compile/T23315/all.T b/testsuite/tests/parser/should_compile/T23315/all.T
new file mode 100644
index 0000000000..940dd71d2e
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/T23315/all.T
@@ -0,0 +1,3 @@
+test('T23315',
+ [extra_files(['Setup.hs']), js_broken(22352)],
+ makefile_test, [])