diff --git a/src/Utils/Misc.hs b/src/Utils/Misc.hs
--- a/src/Utils/Misc.hs
+++ b/src/Utils/Misc.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveDataTypeable, RankNTypes, ScopedTypeVariables, BangPatterns #-}
+{-# LANGUAGE DeriveDataTypeable, RankNTypes, ScopedTypeVariables, BangPatterns, MagicHash #-}
 module Utils.Misc (
   -- * Environment
     envIsSet
@@ -20,6 +20,9 @@
 
   -- * Map operations
   , invertMap
+
+  -- * unsafeEq
+  , unsafeEq
 ) where
 
 import Data.List
@@ -38,6 +41,8 @@
 import qualified Data.ByteString.Base64             as B64  (encode)
 import qualified Blaze.ByteString.Builder.Char.Utf8 as Utf8 (fromString)
 
+import GHC.Exts (reallyUnsafePtrEquality#, Int (I#))
+
 -- | @noDuplicates xs@ returns @True@ if the list @xs@ contains no duplicates
 noDuplicates :: (Ord a) => [a] -> Bool
 noDuplicates xs = all ((==1).length) . group . sort $ xs
@@ -87,3 +92,8 @@
 
 setAny :: (a -> Bool) -> Set a -> Bool
 setAny f = S.foldr (\x b -> f x || b) False
+
+
+unsafeEq :: a -> a -> Bool
+unsafeEq a b =
+  (I# (reallyUnsafePtrEquality# a b)) == 1
diff --git a/tamarin-prover-utils.cabal b/tamarin-prover-utils.cabal
--- a/tamarin-prover-utils.cabal
+++ b/tamarin-prover-utils.cabal
@@ -2,7 +2,7 @@
 
 cabal-version:      >= 1.8
 build-type:         Simple
-version:            0.8.2.0
+version:            0.8.4.0
 license:            GPL
 license-file:       LICENSE
 category:           Theorem Provers
