@@ -33,21 +33,19 @@ import Data.Binary.Get (runGet, getWord32be)
3333import Data.Maybe
3434import Data.Word (Word8)
3535
36−import qualified Data.ByteArray as BA
3736import qualified Data.ByteString as B
3837import qualified Data.ByteString.Lazy as BL
3938
4039-- |Generate a 'UUID' within the specified namespace out of the given
4140-- object.
42−generateNamed :: BA.ByteArrayAccess bs
43− => (B.ByteString -> bs) -- ^Hash
41+generateNamed :: (B.ByteString -> B.ByteString) -- ^Hash
4442 -> Word8 -- ^Version
4543 -> UUID -- ^Namespace
4644 -> [Word8] -- ^Object
4745 -> UUID
4846generateNamed hash version namespace object =
4947 let chunk = B.pack $ toList namespace ++ object
50− bytes = BL.fromStrict . BA.convert $ hash chunk
48+ bytes = BL.fromChunks . (:[]) $ hash chunk
5149 w = getWord32be
5250 unpackBytes = runGet $
5351 buildFromWords version <$> w <*> w <*> w <*> w