diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci065.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci065.script | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci065.stdout | 20 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci066.stdout | 2 |
4 files changed, 38 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/ghci065.hs b/testsuite/tests/ghci/scripts/ghci065.hs index 7d6d0cc497..eb3a4a9829 100644 --- a/testsuite/tests/ghci/scripts/ghci065.hs +++ b/testsuite/tests/ghci/scripts/ghci065.hs @@ -6,6 +6,8 @@ -- {-# LANGUAGE DuplicateRecordFields #-} +{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE TypeFamilies #-} module Test where -- | This is the haddock comment of a data declaration for Data1. @@ -46,3 +48,14 @@ func2 x y = x + y -- Here's multiple line comment for func3. func3 :: Int -> Int -> Int func3 x y = x + y + +-- | This is the haddock comment of a pattern synonym +pattern PatSyn :: Int +pattern PatSyn = 1 + +-- | This is the haddock comment of a type class +class TyCl a where + +-- | This is the haddock comment of a type family +type family TyFam a where + TyFam Int = Bool diff --git a/testsuite/tests/ghci/scripts/ghci065.script b/testsuite/tests/ghci/scripts/ghci065.script index 12d03b1d91..76a241ce8b 100644 --- a/testsuite/tests/ghci/scripts/ghci065.script +++ b/testsuite/tests/ghci/scripts/ghci065.script @@ -12,3 +12,6 @@ :doc func1 :doc func2 :doc func3 +:doc PatSyn +:doc TyCl +:doc TyFam diff --git a/testsuite/tests/ghci/scripts/ghci065.stdout b/testsuite/tests/ghci/scripts/ghci065.stdout index 2ea0831856..4c6f40c72c 100644 --- a/testsuite/tests/ghci/scripts/ghci065.stdout +++ b/testsuite/tests/ghci/scripts/ghci065.stdout @@ -1,12 +1,32 @@ +Data1 :: * -- Type constructor defined at ghci065.hs:14:1 This is the haddock comment of a data declaration for Data1. +Val2a :: Data2 -- Data constructor defined at ghci065.hs:16:14 This is the haddock comment of a data value for Val2a +Val2b :: Data2 -- Data constructor defined at ghci065.hs:17:14 This is the haddock comment of a data value for Val2b +Data3 :: * -- Type constructor defined at ghci065.hs:20:1 This is the haddock comment of a data declaration for Data3. +Data4 :: Int -> Data4 + -- Data constructor defined at ghci065.hs:25:3 This is the haddock comment of a data constructor for Data4. +dupeField :: DupeFields2 -> Int + -- Identifier defined at ghci065.hs:32:9 This is the second haddock comment of a duplicate record field. +dupeField :: DupeFields1 -> Int + -- Identifier defined at ghci065.hs:28:9 This is the first haddock comment of a duplicate record field. +func1 :: Int -> Int -> Int + -- Identifier defined at ghci065.hs:41:1 This is the haddock comment of a function declaration for func1. <has no documentation> +func3 :: Int -> Int -> Int + -- Identifier defined at ghci065.hs:50:1 This is the haddock comment of a function declaration for func3. Here's multiple line comment for func3. +PatSyn :: Int -- Pattern synonym defined at ghci065.hs:54:1 + This is the haddock comment of a pattern synonym +TyCl :: * -> Constraint -- Class defined at ghci065.hs:57:1 + This is the haddock comment of a type class +TyFam :: * -> * -- Type constructor defined at ghci065.hs:60:1 + This is the haddock comment of a type family diff --git a/testsuite/tests/ghci/scripts/ghci066.stdout b/testsuite/tests/ghci/scripts/ghci066.stdout index ab85afa1a6..f56daddbdb 100644 --- a/testsuite/tests/ghci/scripts/ghci066.stdout +++ b/testsuite/tests/ghci/scripts/ghci066.stdout @@ -1 +1,3 @@ +GHC.Prim.byteSwap# :: GHC.Prim.Word# -> GHC.Prim.Word# + -- Identifier defined in ‘GHC.Prim’ Swap bytes in a word. |