diff --git a/Control/Concurrent/Thread/Delay.hs b/Control/Concurrent/Thread/Delay.hs
--- a/Control/Concurrent/Thread/Delay.hs
+++ b/Control/Concurrent/Thread/Delay.hs
@@ -38,7 +38,7 @@
 -------------------------------------------------------------------------------
 
 {-|
-Like 'threadDelay', but not bounded by an 'Int'.
+Like @Control.Concurrent.'threadDelay'@, but not bounded by an 'Int'.
 
 Suspends the current thread for a given number of microseconds (GHC only).
 
diff --git a/Control/Concurrent/Timeout.hs b/Control/Concurrent/Timeout.hs
--- a/Control/Concurrent/Timeout.hs
+++ b/Control/Concurrent/Timeout.hs
@@ -25,10 +25,9 @@
 -- from base:
 import Control.Concurrent       ( forkIO, myThreadId, throwTo, killThread )
 import Control.Exception        ( Exception, bracket, handleJust )
-import Control.Monad            ( return, (>>) )
+import Control.Monad            ( return, (>>), fmap )
 import Data.Bool                ( otherwise )
 import Data.Eq                  ( Eq, (==) )
-import Data.Functor             ( fmap )
 import Data.Maybe               ( Maybe(Nothing, Just) )
 import Data.Ord                 ( (<) )
 import Data.Typeable            ( Typeable )
@@ -48,7 +47,7 @@
 import qualified System.Timeout ( timeout )
 #endif
 
--- from concurrent-extra (this package):
+-- from unbounded-delays (this package):
 import Control.Concurrent.Thread.Delay ( delay )
 
 
@@ -71,7 +70,7 @@
 instance Exception Timeout
 
 {-|
-Like 'System.Timeout.timeout', but not bounded by an 'Int'.
+Like @System.Timeout.'System.Timeout.timeout'@, but not bounded by an 'Int'.
 
 Wrap an 'IO' computation to time out and return 'Nothing' in case no result is
 available within @n@ microseconds (@1\/10^6@ seconds). In case a result is
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,2 +1,19 @@
-import Distribution.Simple
-main = defaultMain
+#! /usr/bin/env runhaskell
+
+import Distribution.Simple                ( defaultMainWithHooks
+                                          , simpleUserHooks
+                                          , UserHooks(haddockHook)
+                                          )
+import Distribution.Simple.Setup          ( HaddockFlags )
+import Distribution.Simple.Program        ( userSpecifyArgs )
+import Distribution.Simple.LocalBuildInfo ( LocalBuildInfo(withPrograms) )
+import Distribution.PackageDescription    ( PackageDescription )
+
+main :: IO ()
+main = defaultMainWithHooks $ simpleUserHooks { haddockHook = haddockHook' }
+
+-- Define __HADDOCK__ for CPP when running haddock.
+haddockHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> HaddockFlags -> IO ()
+haddockHook' pkg lbi = haddockHook simpleUserHooks pkg $ lbi { withPrograms = p }
+    where
+      p = userSpecifyArgs "haddock" ["--optghc=-D__HADDOCK__"] (withPrograms lbi)
diff --git a/unbounded-delays.cabal b/unbounded-delays.cabal
--- a/unbounded-delays.cabal
+++ b/unbounded-delays.cabal
@@ -1,7 +1,7 @@
 name:          unbounded-delays
-version:       0.1
+version:       0.1.0.1
 cabal-version: >= 1.6
-build-type:    Simple
+build-type:    Custom
 author:        Bas van Dijk <v.dijk.bas@gmail.com>
                Roel van Dijk <vandijk.roel@gmail.com>
 maintainer:    Bas van Dijk <v.dijk.bas@gmail.com>
@@ -21,7 +21,7 @@
   Location: http://code.haskell.org/~basvandijk/code/unbounded-delays
 
 library
-  build-depends: base >= 3 && < 4.4
+  build-depends: base >= 4 && < 4.4
   exposed-modules: Control.Concurrent.Thread.Delay
                  , Control.Concurrent.Timeout
   ghc-options: -Wall
