on e02eef2 help sign in
stackage/patching/patches/uuid-1.3.1.patch
30 lines 964 B history raw
1diff -ru orig/Data/UUID/Internal.hs new/Data/UUID/Internal.hs
2--- orig/Data/UUID/Internal.hs 2013-10-22 19:00:23.458184957 +0300
3+++ new/Data/UUID/Internal.hs 2013-10-22 19:00:23.000000000 +0300
4@@ -391,12 +391,24 @@
5
6 -- | Similar to `toASCIIBytes` except we produce a lazy `BL.ByteString`.
7 toLazyASCIIBytes :: UUID -> BL.ByteString
8-toLazyASCIIBytes = BL.fromStrict . toASCIIBytes
9+toLazyASCIIBytes =
10+#if MIN_VERSION_bytestring(0,10,0)
11+ BL.fromStrict
12+#else
13+ BL.fromChunks . return
14+#endif
15+ . toASCIIBytes
17 -- | Similar to `fromASCIIBytes` except parses from a lazy `BL.ByteString`.
18 fromLazyASCIIBytes :: BL.ByteString -> Maybe UUID
19 fromLazyASCIIBytes bs =
20- if BL.length bs == 36 then fromASCIIBytes (BL.toStrict bs) else Nothing
21+ if BL.length bs == 36 then fromASCIIBytes (
22+#if MIN_VERSION_bytestring(0,10,0)
23+ BL.toStrict bs
24+#else
25+ B.concat $ BL.toChunks bs
26+#endif
27+ ) else Nothing
29 --
30 -- Class Instances