diff --git a/Control/Hmk.lhs b/Control/Hmk.lhs
--- a/Control/Hmk.lhs
+++ b/Control/Hmk.lhs
@@ -28,6 +28,7 @@
 > import Control.Monad.Reader
 > import Data.List (find)
 > import qualified Data.Set as Set
+> import Prelude -- Silence AMP warning
 
 Hmk manages dependencies between entities. These dependencies are
 specified by means of rules, establishing a dependency between the
diff --git a/Eval.lhs b/Eval.lhs
--- a/Eval.lhs
+++ b/Eval.lhs
@@ -22,7 +22,7 @@
 >
 > import Data.Sequence (Seq)
 > import qualified Data.Sequence as Seq
-> import qualified Data.Foldable as Seq
+> import qualified Data.Foldable as Seq hiding (length)
 > import qualified Data.Traversable as Seq
 > import Data.Map (Map)
 > import qualified Data.Map as Map
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,8 @@
+
+module Main (main) where
+
+import Distribution.Simple
+
+main :: IO ()
+main = defaultMain
+
diff --git a/Setup.lhs b/Setup.lhs
deleted file mode 100644
--- a/Setup.lhs
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env runhaskell
-> import Distribution.Simple
-> main = defaultMain
diff --git a/hmk.cabal b/hmk.cabal
--- a/hmk.cabal
+++ b/hmk.cabal
@@ -1,5 +1,5 @@
 name:           hmk
-version:        0.9.7.3
+version:        0.9.7.4
 author:         Mathieu Boespflug
 maintainer:     Mathieu Boespflug <mboes - at - tweag.net>
 homepage:       http://www.github.com/mboes/hmk
@@ -24,7 +24,7 @@
 copyright:      (c) 2008-2009. Mathieu Boespflug <mboes - at - tweag.net>
 cabal-version:  >= 1.6.0
 build-type:     Simple
-tested-with:    GHC == 6.12.1
+tested-with:    GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4
 
 source-repository head
   type:     git
@@ -32,7 +32,7 @@
 
 library
     build-depends:   base < 5, containers
-    extensions:	     PatternGuards
+    extensions:      FlexibleContexts, PatternGuards
     exposed-modules: Control.Hmk
                      Control.Hmk.Analyze
                      Control.Hmk.IO
@@ -42,8 +42,7 @@
     main-is:         Main.lhs
     ghc-options:     -fwarn-unused-imports
     other-modules:   Parse, Eval, Metarule
-    extensions:	     PatternGuards, NamedFieldPuns, RecursiveDo
+    extensions:      FlexibleContexts, PatternGuards, NamedFieldPuns, RecursiveDo
     build-depends:   base < 5, bytestring, containers,
                      directory, process, unix, filepath >= 1.1,
-                     mtl >= 1.1 && < 2.1, parsec >= 3.0.0, pcre-light >= 0.3
-                     
+                     mtl >= 1.1, parsec >= 3.0.0, pcre-light >= 0.3
