summaryrefslogtreecommitdiff
path: root/testsuite/tests/showIface/DocsInHiFile.hs
blob: e753eb5e4222a95ee8bc91365f5c63886d0ba6f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{-# LANGUAGE TypeFamilies #-}
{-| `elem`, 'print',
`Unknown',
'<>', ':=:', 'Bool'
-}
module DocsInHiFile
  ( DocsInHiFile.elem
  , D(..)
  , add
  , P(..)
  , Show(..)
  ) where

-- | '()', 'elem'.
elem :: ()
elem = ()

-- | A datatype.
data D
  = D0 -- ^ A constructor for 'D'. '
  | D1 -- ^ Another constructor
  deriving ( Show -- ^ 'Show' instance
           )

add :: Int -- ^ First summand for 'add'
    -> Int -- ^ Second summand
    -> Int -- ^ Sum
add a b = a + b

-- | A class
class P f where
  -- | A class method
  p :: a -- ^ An argument
    -> f a

-- | Another datatype...
data D'
-- ^ ...with two docstrings.

-- | A type family
type family F a
-- | A type family instance
type instance F Int = Bool