mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-12 07:18:31 +01:00
44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
diff -ru orig/src/Codec/Binary/UTF8/Light.hs new/src/Codec/Binary/UTF8/Light.hs
|
|
--- orig/src/Codec/Binary/UTF8/Light.hs 2013-10-15 09:40:45.447493856 +0300
|
|
+++ new/src/Codec/Binary/UTF8/Light.hs 2013-10-15 09:40:45.000000000 +0300
|
|
@@ -251,15 +251,27 @@
|
|
-- can use Word# literalls
|
|
-- ==> 0xff00ff00##
|
|
encodeUTF8' ((W32# w):xs)
|
|
+#if MIN_VERSION_base(4,7,0)
|
|
+ | I# (w`ltWord#`(int2Word# 0x80#)) /= 0 =
|
|
+#else
|
|
| w`ltWord#`(int2Word# 0x80#) =
|
|
+#endif
|
|
[W8# w] : encodeUTF8' xs
|
|
+#if MIN_VERSION_base(4,7,0)
|
|
+ | I# (w`ltWord#`(int2Word# 0x800#)) /= 0 =
|
|
+#else
|
|
| w`ltWord#`(int2Word# 0x800#) =
|
|
+#endif
|
|
[ W8#(w`uncheckedShiftRL#`6#
|
|
`or#`(int2Word# 0xc0#))
|
|
, W8#(w`and#`(int2Word# 0x3f#)
|
|
`or#`(int2Word# 0x80#))
|
|
] : encodeUTF8' xs
|
|
+#if MIN_VERSION_base(4,7,0)
|
|
+ | I# (w`ltWord#`(int2Word# 0xf0000#)) /= 0 =
|
|
+#else
|
|
| w`ltWord#`(int2Word# 0xf0000#) =
|
|
+#endif
|
|
[ W8#(w`uncheckedShiftRL#`12#
|
|
`or#`(int2Word# 0xe0#))
|
|
, W8#(w`uncheckedShiftRL#`6#
|
|
@@ -268,7 +280,11 @@
|
|
, W8#(w`and#`(int2Word# 0x3f#)
|
|
`or#`(int2Word# 0x80#))
|
|
] : encodeUTF8' xs
|
|
+#if MIN_VERSION_base(4,7,0)
|
|
+ | I# (w`ltWord#`(int2Word# 0xe00000#)) /= 0 =
|
|
+#else
|
|
| w`ltWord#`(int2Word# 0xe00000#) =
|
|
+#endif
|
|
[ W8#(w`uncheckedShiftRL#`18#
|
|
`or#`(int2Word# 0xf0#))
|
|
, W8#(w`uncheckedShiftRL#`12#
|