diff --git a/CHANGELOG.txt b/CHANGELOG.txt
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,7 @@
+2011-03-17, 0.4.1:
+	Dependency update and Cabalization of the test executable, thanks to JP
+	Moresmau.
+
 2010-09-11, 0.4:
 	Fixed documentation of the 'deletePrefix' function: if the given key is not
 	a prefix of any key, an empty, not unchanged, map/set is returned. Thanks to
diff --git a/list-tries.cabal b/list-tries.cabal
--- a/list-tries.cabal
+++ b/list-tries.cabal
@@ -1,7 +1,7 @@
 Cabal-Version: >= 1.6
 
 Name:        list-tries
-Version:     0.4
+Version:     0.4.1
 Homepage:    http://iki.fi/matti.niemenmaa/list-tries/
 Synopsis:    Tries and Patricia tries: finite sets and maps for list keys
 Category:    Data, Data Structures
@@ -36,11 +36,15 @@
                     tests/*.hs
                     tests/Tests/*.hs
 
+flag testing
+  description: Enable building a test executable
+  default: False
+
 Library
    Extensions: CPP
 
-   Build-Depends: base       >= 3   && < 4.3
-                , containers >= 0.3 && < 0.4
+   Build-Depends: base       >= 3   && < 4.4
+                , containers >= 0.3 && < 0.5
                 , dlist      >= 0.4 && < 0.6
                 , binary     >= 0.5 && < 0.6
 
@@ -66,5 +70,57 @@
                     Data.ListTrie.Base.Map.Internal
                     Data.ListTrie.Patricia.Base
                     Data.ListTrie.Util
+
+   Include-Dirs: headers
+
+executable list-tries-tests
+   if !flag(testing)
+      buildable: False
+
+   main-is: Main.hs
+   hs-source-dirs: ., tests
+   Extensions: CPP
+
+   Build-Depends: base       >= 3   && < 4.4
+                , containers >= 0.3 && < 0.5
+                , dlist      >= 0.4 && < 0.6
+                , binary     >= 0.5 && < 0.6
+
+   if flag(testing)
+     Build-Depends: template-haskell           >= 2.3 && < 2.6
+                  , HUnit                      >= 1.2 && < 1.3
+                  , QuickCheck                 >= 2.1 && < 2.5
+                  , test-framework             >= 0.2 && < 0.4
+                  , test-framework-hunit       >= 0.2 && < 0.3
+                  , test-framework-quickcheck2 >= 0.2 && < 0.3
+                  , ChasingBottoms             >= 1.2 && < 1.4
+
+   Other-Modules: Data.ListTrie.Base.Map
+                  Data.ListTrie.Map
+                  Data.ListTrie.Map.Eq
+                  Data.ListTrie.Map.Ord
+                  Data.ListTrie.Map.Enum
+                  Data.ListTrie.Set
+                  Data.ListTrie.Set.Eq
+                  Data.ListTrie.Set.Ord
+                  Data.ListTrie.Set.Enum
+                  Data.ListTrie.Patricia.Map
+                  Data.ListTrie.Patricia.Map.Eq
+                  Data.ListTrie.Patricia.Map.Ord
+                  Data.ListTrie.Patricia.Map.Enum
+                  Data.ListTrie.Patricia.Set
+                  Data.ListTrie.Patricia.Set.Eq
+                  Data.ListTrie.Patricia.Set.Ord
+                  Data.ListTrie.Patricia.Set.Enum
+                  Data.ListTrie.Base
+                  Data.ListTrie.Base.Classes
+                  Data.ListTrie.Base.Map.Internal
+                  Data.ListTrie.Patricia.Base
+                  Data.ListTrie.Util
+                  Tests.Base
+                  Tests.Cases
+                  Tests.Properties
+                  Tests.Strictness
+                  Tests.TH
 
    Include-Dirs: headers
