diff --git a/Data/Array/CArray/Base.hs b/Data/Array/CArray/Base.hs
--- a/Data/Array/CArray/Base.hs
+++ b/Data/Array/CArray/Base.hs
@@ -1,5 +1,6 @@
 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, MagicHash,
-  FlexibleInstances, FlexibleContexts, UnboxedTuples, DeriveDataTypeable, CPP #-}
+  FlexibleInstances, FlexibleContexts, UnboxedTuples, DeriveDataTypeable, CPP,
+  BangPatterns #-}
 #ifdef __GLASGOW_HASKELL__
 #if __GLASGOW_HASKELL__ < 610
 {-# OPTIONS_GHC -frewrite-rules #-}
@@ -43,7 +44,7 @@
 import Data.Ix.Shapable
 import Data.Array.Base
 import Data.Array.MArray
-import Data.Array.IArray
+import Data.Array.IArray        ()
 import qualified Data.ByteString.Internal as S
 import Data.Binary
 import Data.Complex
@@ -54,11 +55,9 @@
 import Foreign.Ptr
 import Foreign.Marshal.Alloc
 import Foreign.Marshal.Array    (copyArray)
-import Data.Word                (Word8,Word)
+import Data.Word                ()
 
 import Data.Generics            (Data(..), Typeable(..))
-import GHC.Base                 (realWorld#, Addr#)
-import GHC.IOBase               (IO(..))
 import GHC.Ptr                  (Ptr(..))
 import GHC.ForeignPtr           (ForeignPtr(..), mallocPlainForeignPtrBytes)
 
@@ -150,8 +149,8 @@
           go dummy (l,u) | safe = Just (CArray l u n fp)
                          | otherwise = Nothing
               where n = rangeSize (l,u)
-                    ((ForeignPtr addr contents), off, len) = S.toForeignPtr bs
-                    p@(Ptr addr') = Ptr addr `plusPtr` off
+                    !((ForeignPtr addr contents), off, len) = S.toForeignPtr bs
+                    !p@(Ptr addr') = Ptr addr `plusPtr` off
                     fp = ForeignPtr addr' contents
                     safe = sizeOf dummy * n <= len && p == p `alignPtr` alignment dummy
 
@@ -200,7 +199,7 @@
     {-# NOINLINE unsafeArray #-}
     unsafeArray lu ies = unsafePerformIO $ unsafeArrayCArray lu ies (zeroElem (undefined :: e))
     {-# INLINE unsafeAt #-}
-    unsafeAt (CArray _ _ _ fp) i = unsafeInlinePerformIO $
+    unsafeAt (CArray _ _ _ fp) i = S.inlinePerformIO $
                                    withForeignPtr fp $ \a -> peekElemOff a i
     {-# NOINLINE unsafeReplace #-}
     unsafeReplace arr ies = unsafePerformIO $ unsafeReplaceCArray arr ies
@@ -404,7 +403,7 @@
 -- transparency!
 {-# INLINE mapCArrayInPlace #-}
 mapCArrayInPlace :: (Ix i, IArray CArray e, Storable e) => (e -> e) -> CArray i e -> CArray i e
-mapCArrayInPlace f a = unsafeInlinePerformIO $ do
+mapCArrayInPlace f a = S.inlinePerformIO $ do
     withCArray a $ \p ->
         forM_ [0 .. size a - 1] $ \i ->
             peekElemOff p i >>= pokeElemOff p i . f
@@ -499,36 +498,6 @@
     abs_ = abs
 
 
--- | This variant of 'unsafePerformIO' is quite /mind-bogglingly unsafe/. It
--- unstitches the dependency chain that holds the IO monad together and breaks
--- all your ordinary intuitions about IO, sequencing and side effects. Avoid
--- it unless you really know what you are doing.
---
--- It is only safe for operations which are genuinely pure (not just
--- externally pure) for example reading from an immutable foreign data
--- structure. In particular, you should do no memory allocation inside an
--- 'unsafeInlinePerformIO' block. This is because an allocation is a constant
--- and is likely to be floated out and shared. More generally, any part of any
--- IO action that does not depend on a function argument is likely to be
--- floated to the top level and have its result shared.
---
--- It is more efficient because in addition to the checks that
--- 'unsafeDupablePerformIO' omits, we also inline. Additionally we do not
--- pretend that the body is lazy which allows the strictness analyser to see
--- the strictness in the body. In turn this allows some re-ordering of
--- operations and any corresponding side-effects.
---
--- With GHC it compiles to essentially no code and it exposes the body to
--- further inlining.
---
-{-# INLINE unsafeInlinePerformIO #-}
-unsafeInlinePerformIO :: IO a -> a
-#ifdef __GLASGOW_HASKELL__
-unsafeInlinePerformIO (IO m) = case m realWorld# of (# _, r #) -> r
-#else
-unsafeInlinePerformIO = unsafePerformIO
-#endif
-
 -- | Allocate an array which is 16-byte aligned.  Essential for SIMD instructions.
 mallocForeignPtrArrayAligned :: Storable a => Int -> IO (ForeignPtr a)
 mallocForeignPtrArrayAligned n = doMalloc undefined
@@ -543,7 +512,7 @@
 mallocForeignPtrBytesAligned :: Int -> IO (ForeignPtr a)
 mallocForeignPtrBytesAligned n = do
     (ForeignPtr addr contents) <- mallocPlainForeignPtrBytes (n + pad)
-    let (Ptr addr') = alignPtr (Ptr addr) 16
+    let !(Ptr addr') = alignPtr (Ptr addr) 16
     return (ForeignPtr addr' contents)
     where pad = 16 - sizeOf (undefined :: Word)
 
diff --git a/carray.cabal b/carray.cabal
--- a/carray.cabal
+++ b/carray.cabal
@@ -1,5 +1,5 @@
 name:                carray
-version:             0.1.4
+version:             0.1.5
 synopsis:            A C-compatible array library.
 description:
 		     A C-compatible array library.
@@ -37,7 +37,7 @@
     build-depends: base < 3, binary
 
   if flag(base4)
-    build-depends: base >= 4, syb >= 0.1
+    build-depends: base >= 4 && < 5, syb >= 0.1
   else
     build-depends: base < 4
 
