1{-| 2Module : W 3Description : Short description 4Copyright : (c) Some Guy, 2013 5 Someone Else, 2014 6License : GPL-3 7Maintainer : sample@email.com 8Stability : experimental 9Portability : POSIX 10 11Here is a longer description of this module, containing some 12commentary with @some markup@. 13-} 14module HaddockComments where 15 16-- | Function1 comment 17fun1 18 :: Int -- ^ The 'Int' argument 19 -> Float -- ^ The 'Float' argument 20 -> IO () -- ^ The return value 21fun1 = undefined 22 23 24-- not a haddock comment 25fun2 = undefined 26 27fun3 :: Int -> Int 28-- ^ Function3 comment 29fun3 = undefined 30 31{-| 32 The 'square' function squares an integer. 33 It takes one argument, of type 'Int'. 34-} 35square :: Int -> Int 36square x = x * x -- beware! 37 38class C a where 39 -- | This is the documentation for the 'f' method 40 f :: a -> Int 41 -- | This is the documentation for the 'g' method 42 g :: Int -> a 43 44-- | Data type comment 45-- With a second line 46data MyData = 47 -- | Constructor1 comment 48 Cons1 49 { cons1Field1 :: Int -- ^ Constructor 1 field 1 comment 50 -- spanning two lines 51 -- | Constructor 1 field 2 comment 52 , cons1Field2 :: Int 53 , cons1Field3 :: String -- Not a haddock comment 54 } 55 | Cons2 -- ^ Constructor 2 comment 56 Int -- ^ Last 57