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 44 45 46 47 48 49 50 51 52 53 54 55 56
|
{-|
Module : W
Description : Short description
Copyright : (c) Some Guy, 2013
Someone Else, 2014
License : GPL-3
Maintainer : sample@email.com
Stability : experimental
Portability : POSIX
Here is a longer description of this module, containing some
commentary with @some markup@.
-}
module HaddockComments where
-- | Function1 comment
fun1
:: Int -- ^ The 'Int' argument
-> Float -- ^ The 'Float' argument
-> IO () -- ^ The return value
fun1 = undefined
-- not a haddock comment
fun2 = undefined
fun3 :: Int -> Int
-- ^ Function3 comment
fun3 = undefined
{-|
The 'square' function squares an integer.
It takes one argument, of type 'Int'.
-}
square :: Int -> Int
square x = x * x -- beware!
class C a where
-- | This is the documentation for the 'f' method
f :: a -> Int
-- | This is the documentation for the 'g' method
g :: Int -> a
-- | Data type comment
-- With a second line
data MyData =
-- | Constructor1 comment
Cons1
{ cons1Field1 :: Int -- ^ Constructor 1 field 1 comment
-- spanning two lines
-- | Constructor 1 field 2 comment
, cons1Field2 :: Int
, cons1Field3 :: String -- Not a haddock comment
}
| Cons2 -- ^ Constructor 2 comment
Int -- ^ Last
|