File: Haddock1.hs

package info (click to toggle)
haskell-ghc-exactprint 1.7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,044 kB
  • sloc: haskell: 32,076; makefile: 7
file content (33 lines) | stat: -rw-r--r-- 919 bytes parent folder | download
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
{-# OPTIONS_GHC -fno-warn-redundant-constraints -haddock #-}
-- | Haddock comment,
-- coming before the module
module Haddock1 (

        -- | This is some inline documentation in the export list
        --
        -- > a code block using bird-tracks
        -- > each line must begin with > (which isn't significant unless it
        -- > is at the beginning of the line).
        f

        {-| nested-style doc comments -}
        , g

        -- * A section
        -- and without an intervening comma:
        -- ** A subsection
   ) where

-- | Haddock before imports
import Data.List

-- | Haddock before decl
f = undefined
g = undefined

-- | This comment applies to the /following/ declaration
-- and it continues until the next non-comment line
data T a b
 = A Int (Maybe Float) -- ^ This comment describes the 'A' constructor
 | -- | This comment describes the 'B' constructor
   B (T a b, T Int Float) -- ^