diff --git a/Data/BDelta.hsc b/Data/BDelta.hsc
--- a/Data/BDelta.hsc
+++ b/Data/BDelta.hsc
@@ -5,9 +5,17 @@
 -- License:      MIT
 --
 -- Maintainer:   joeyadams3.14159@gmail.com
--- Stability:    experimental
+-- Stability:    deprecated (renamed to bytestring-delta)
 -- Portability:  unknown
 --
+-- This package has been renamed from bdelta to bytestring-delta, to avoid
+-- conflicting with an existing project by the same name:
+--
+--  * <http://bdelta.org>
+--
+-- Please import Data.ByteString.Delta from the bytestring-delta package
+-- instead.
+--
 -- Binary diff/patch for 'ByteString's.
 --
 -- The 'diff' function takes two 'ByteString's, and produces a \"patch\" that
@@ -31,7 +39,13 @@
 -- more than 1000 bytes.  This may be improved in a future version of the
 -- library.
 
-module Data.BDelta (diff, patch) where
+module Data.BDelta
+{-# DEPRECATED "bdelta has been renamed.  Please use package bytestring-delta instead." #-}
+(
+    diff,
+    patch,
+)
+where
 
 #include "bdelta.h"
 
@@ -39,10 +53,19 @@
 import Data.ByteString.Unsafe (unsafeUseAsCStringLen)
 import Data.Int
 import Data.Word
-import Foreign (Ptr, alloca, peek, unsafePerformIO)
+import Foreign (Ptr, alloca, peek)
 import Foreign.C.String (CString, peekCAString)
-import Foreign.C.Types (CChar, CSize)
+import Foreign.C.Types
 
+#if MIN_VERSION_base(4,4,0)
+import Foreign.Marshal.Unsafe (unsafeLocalState)
+#else
+import System.IO.Unsafe (unsafePerformIO)
+
+unsafeLocalState :: IO a -> a
+unsafeLocalState = unsafePerformIO
+#endif
+
 type BDELTAcode = #{type BDELTAcode}
 
 type BDeltaFunc = Ptr CChar       -> CSize
@@ -66,7 +89,7 @@
 
 callBDeltaFunc :: BDeltaFunc -> ByteString -> ByteString -> Either BDELTAcode ByteString
 callBDeltaFunc func old new =
-    unsafePerformIO $
+    unsafeLocalState $
     unsafeUseAsCStringLen old $ \(oldPtr, oldSize) ->
     unsafeUseAsCStringLen new $ \(newPtr, newSize) ->
     alloca $ \diffPtrPtr ->
@@ -85,7 +108,7 @@
             _ -> return $ Left rc
 
 strerror :: BDELTAcode -> String
-strerror code = unsafePerformIO $ peekCAString =<< bdelta_strerror code
+strerror code = unsafeLocalState $ bdelta_strerror code >>= peekCAString
 
 -- | Compute a delta between two 'ByteString's.
 --
diff --git a/bdelta.cabal b/bdelta.cabal
--- a/bdelta.cabal
+++ b/bdelta.cabal
@@ -1,7 +1,12 @@
 Name:                bdelta
-Version:             0.1
+Version:             0.1.1
 Synopsis:            Simple, fast binary diff/patch
 Description:
+    This package has been renamed from bdelta to bytestring-delta, to avoid
+    conflicting with an existing project by the same name:
+    .
+        * <http://bdelta.org>
+    .
     Compute a patch between two ByteStrings which can later be applied to the
     first to produce the second.  This can be used to save bandwidth and disk
     space when many strings differing by a small number of bytes need to be
@@ -16,7 +21,7 @@
     space and time with respect to the length of the patch.  A better
     algorithm may be introduced in a future version of bdelta.
 
-Homepage:            http://github.com/joeyadams/haskell-bdelta
+Homepage:            http://github.com/joeyadams/haskell-bytestring-delta
 License:             MIT
 License-file:        LICENSE
 Author:              Joey Adams
@@ -30,7 +35,7 @@
 
 source-repository head
     type:       git
-    location:   git://github.com/joeyadams/haskell-bdelta.git
+    location:   git://github.com/joeyadams/haskell-bytestring-delta.git
 
 Library
   Exposed-modules:     Data.BDelta
