diff --git a/CHANGES b/CHANGES
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+Changes in version 2.7.1:
+
+  * Fix problems with library part of .cabal file
+
+-----------------------------------------------------------------------------
+
 Changes in version 2.7.0:
 
   * Instances can be commented
diff --git a/doc/haddock.xml b/doc/haddock.xml
--- a/doc/haddock.xml
+++ b/doc/haddock.xml
@@ -16,7 +16,7 @@
       <holder>Simon Marlow</holder>
     </copyright>
     <abstract>
-      <para>This document describes Haddock version 2.7.0, a Haskell
+      <para>This document describes Haddock version 2.7.1, a Haskell
       documentation tool.</para>
     </abstract>
   </bookinfo>
diff --git a/haddock.cabal b/haddock.cabal
--- a/haddock.cabal
+++ b/haddock.cabal
@@ -1,5 +1,5 @@
 name:                 haddock
-version:              2.7.0
+version:              2.7.1
 cabal-version:        >= 1.6
 license:              BSD3
 build-type:           Simple
@@ -124,19 +124,57 @@
     Haddock.Convert
    
 library
+  build-depends:
+    base >= 4.0.0.0 && < 4.3.0.0,
+    filepath,
+    directory,
+    pretty,
+    containers,
+    array,
+    Cabal >= 1.5,
+    ghc >= 6.12 && < 6.14,
+    ghc-paths
+
+  if flag(test)
+    cpp-options: -DTEST
+    build-depends: QuickCheck >= 2.1 && < 3
+
   hs-source-dirs:       src
   extensions:           CPP, PatternGuards, DeriveDataTypeable,
                         ScopedTypeVariables, MagicHash
+  ghc-options:          -funbox-strict-fields -O2 -Wall
+
   exposed-modules:
     Documentation.Haddock
 
   other-modules:
+    Haddock.Interface
+    Haddock.Interface.Rename
+    Haddock.Interface.Create
+    Haddock.Interface.ExtractFnArgDocs
+    Haddock.Interface.AttachInstances
+    Haddock.Interface.Rn
+    Haddock.Interface.LexParseRn
+    Haddock.Interface.ParseModuleHeader
     Haddock.Lex
     Haddock.Parse
+    Haddock.Utils.BlockTable
+    Haddock.Utils.Html
+    Haddock.Utils
+    Haddock.Backends.Html
+    Haddock.Backends.HaddockDB
+    Haddock.Backends.DevHelp
+    Haddock.Backends.HH
+    Haddock.Backends.HH2
+    Haddock.Backends.Hoogle
+    Haddock.ModuleTree
     Haddock.Types
+    Haddock.Doc
+    Haddock.Version
     Haddock.InterfaceFile
-    Haddock.Utils
+    Haddock.Options
     Haddock.GhcUtils
+    Haddock.Convert
   
   if flag(in-ghc-tree)
     buildable: False
diff --git a/haddock.spec b/haddock.spec
--- a/haddock.spec
+++ b/haddock.spec
@@ -17,7 +17,7 @@
 # version label of your release tarball.
 
 %define name    haddock
-%define version 2.7.0
+%define version 2.7.1
 %define release 1
 
 Name:           %{name}
