 --
 allocaBytes :: Int64 -> (DevicePtr a -> IO b) -> IO b
 allocaBytes bytes =
-    bracket (forceEither `fmap` malloc bytes) free
+    bracket (moduleForceEither `fmap` malloc bytes) free
 
 
 -- |

new :: Storable a => a -> IO (DevicePtr a)
new v =
    let bytes = fromIntegral (F.sizeOf v) in
    forceEither `fmap` malloc bytes >>= \dptr ->
    poke dptr v >>= \rv ->
    case rv of
        Nothing -> return dptr

moduleErr :: String -> String -> a
moduleErr fun msg =  error ("Foreign.CUDA." ++ fun ++ ':':' ':msg)

moduleForceEither :: Either String a -> a
moduleForceEither (Left  s) = moduleErr "Marshal" s
moduleForceEither (Right r) = r

