diff --git a/Graphs/GetAttributes.hs b/Graphs/GetAttributes.hs
--- a/Graphs/GetAttributes.hs
+++ b/Graphs/GetAttributes.hs
@@ -15,7 +15,7 @@
    displayError, -- :: String -> IO ()
    ) where
 
-import Control.Exception
+import Control.Exception as Exception
 
 import Util.Dynamics
 import Util.Registry hiding (getValue)
@@ -256,15 +256,18 @@
 newtype CancelException = CancelException () deriving (Typeable)
 
 cancelQuery :: IO anything
-cancelQuery = throwDyn (CancelException ())
+cancelQuery = throw $ toDyn (CancelException ())
 
 allowCancel :: IO a -> IO (Maybe a)
 allowCancel action =
-   catchDyn
+   Exception.catchJust
+      (\ e -> case fromDynamic e of
+           Just (CancelException ()) -> return $ Just ()
+           _ -> return Nothing)
       (do
          result <- action
          return (Just result)
          )
-      (\ (CancelException ()) -> return Nothing)
+      (\ _ -> return Nothing)
 
 
diff --git a/Graphs/SimpleGraph.hs b/Graphs/SimpleGraph.hs
--- a/Graphs/SimpleGraph.hs
+++ b/Graphs/SimpleGraph.hs
@@ -42,7 +42,7 @@
 import Data.List(delete)
 
 import Control.Concurrent
-import Control.Exception(try)
+import Control.Exception
 
 import Util.Computation (done)
 import Util.Object
@@ -341,7 +341,8 @@
                               (clientSink clientData update)
                            case result of
                               Left exception ->
-                                 putStrLn ("Client error "++(show exception))
+                                 putStrLn ("Client error " ++
+                                           show (exception :: SomeException))
                               Right () -> done
                      else
                         done
diff --git a/uni-graphs.cabal b/uni-graphs.cabal
--- a/uni-graphs.cabal
+++ b/uni-graphs.cabal
@@ -1,5 +1,5 @@
 name:           uni-graphs
-version:        2.2.0.0
+version:        2.2.1.0
 build-type:     Simple
 license:        LGPL
 license-file:   LICENSE
@@ -10,7 +10,7 @@
 synopsis:       Graphs
 description:    Graphs toolkit
 cabal-version:  >= 1.4
-Tested-With:    GHC==6.8.3, GHC==6.10.4, GHC==6.12.3
+Tested-With:    GHC==6.10.4, GHC==6.12.3
 
 flag debug
   description: add debug traces
@@ -25,13 +25,10 @@
     Graphs.EmptyGraphSort, Graphs.PureGraph, Graphs.PureGraphPrune,
     Graphs.PureGraphToGraph, Graphs.VersionDag, Graphs.PureGraphMakeConsistent
 
-  build-depends: base >=3 && < 4, containers, mtl, uni-util, uni-events,
+  build-depends: base >=4 && < 5, containers, mtl, uni-util, uni-events,
     uni-reactor, uni-htk
 
   if flag(debug)
     cpp-options: -DDEBUG
 
-  if impl(ghc < 6.10)
-    extensions: PatternSignatures
-  else
-    ghc-options: -fwarn-unused-imports -fno-warn-warnings-deprecations
+  ghc-options: -fwarn-unused-imports -fno-warn-warnings-deprecations
