summaryrefslogtreecommitdiff
path: root/testsuite/tests/haddock
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/haddock')
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/T11768.hs7
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/T11768.stderr2
2 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T11768.hs b/testsuite/tests/haddock/should_compile_flag_haddock/T11768.hs
index 5689b42380..5e7369cdc0 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/T11768.hs
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/T11768.hs
@@ -1,6 +1,12 @@
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
module T11768 where
+class C a b
+
data Foo = Foo
deriving Eq -- ^ Documenting a single type
@@ -8,6 +14,7 @@ data Bar = Bar
deriving ( Eq -- ^ Documenting one of multiple types
, Ord
)
+ deriving anyclass ( forall a. C a {- ^ Documenting forall type -} )
-- | Documenting a standalone deriving instance
deriving instance Read Bar
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T11768.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T11768.stderr
index 997c2ef24c..6de1b2b851 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/T11768.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/T11768.stderr
@@ -1,12 +1,14 @@
==================== Parser ====================
module T11768 where
+class C a b
data Foo
= Foo
deriving Eq " Documenting a single type"
data Bar
= Bar
deriving (Eq " Documenting one of multiple types", Ord)
+ deriving anyclass (forall a. C a " Documenting forall type ")
<document comment>
deriving instance Read Bar