From 2bd5cd1ceb636f88ff00fb89da2fe3b6290549a9 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 22 Oct 2013 19:00:41 +0300 Subject: [PATCH] uuid patch --- patching/patches/uuid-1.3.1.patch | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 patching/patches/uuid-1.3.1.patch diff --git a/patching/patches/uuid-1.3.1.patch b/patching/patches/uuid-1.3.1.patch new file mode 100644 index 00000000..757edb9e --- /dev/null +++ b/patching/patches/uuid-1.3.1.patch @@ -0,0 +1,30 @@ +diff -ru orig/Data/UUID/Internal.hs new/Data/UUID/Internal.hs +--- orig/Data/UUID/Internal.hs 2013-10-22 19:00:23.458184957 +0300 ++++ new/Data/UUID/Internal.hs 2013-10-22 19:00:23.000000000 +0300 +@@ -391,12 +391,24 @@ + + -- | Similar to `toASCIIBytes` except we produce a lazy `BL.ByteString`. + toLazyASCIIBytes :: UUID -> BL.ByteString +-toLazyASCIIBytes = BL.fromStrict . toASCIIBytes ++toLazyASCIIBytes = ++#if MIN_VERSION_bytestring(0,10,0) ++ BL.fromStrict ++#else ++ BL.fromChunks . return ++#endif ++ . toASCIIBytes + + -- | Similar to `fromASCIIBytes` except parses from a lazy `BL.ByteString`. + fromLazyASCIIBytes :: BL.ByteString -> Maybe UUID + fromLazyASCIIBytes bs = +- if BL.length bs == 36 then fromASCIIBytes (BL.toStrict bs) else Nothing ++ if BL.length bs == 36 then fromASCIIBytes ( ++#if MIN_VERSION_bytestring(0,10,0) ++ BL.toStrict bs ++#else ++ B.concat $ BL.toChunks bs ++#endif ++ ) else Nothing + + -- + -- Class Instances