on master help sign in
utf8-light for GHC 7.8
commit48f5629dd86e08d1caed13b621b8a061bd7db37b authorMichael Snoyman <michael@snoyman.com> dateTue 15 Oct 2013, 09:40 (13 years ago) parentd8dec4f
1 file changed+43
patching/patches/utf8-light-0.4.0.1.patch+43
patching/patches/utf8-light-0.4.0.1.patchnew file+43
@@ -0,0 +1,43 @@
1+diff -ru orig/src/Codec/Binary/UTF8/Light.hs new/src/Codec/Binary/UTF8/Light.hs
2+--- orig/src/Codec/Binary/UTF8/Light.hs 2013-10-15 09:40:45.447493856 +0300
3++++ new/src/Codec/Binary/UTF8/Light.hs 2013-10-15 09:40:45.000000000 +0300
4+@@ -251,15 +251,27 @@
5+ -- can use Word# literalls
6+ -- ==> 0xff00ff00##
7+ encodeUTF8' ((W32# w):xs)
8++#if MIN_VERSION_base(4,7,0)
9++ | I# (w`ltWord#`(int2Word# 0x80#)) /= 0 =
10++#else
11+ | w`ltWord#`(int2Word# 0x80#) =
12++#endif
13+ [W8# w] : encodeUTF8' xs
14++#if MIN_VERSION_base(4,7,0)
15++ | I# (w`ltWord#`(int2Word# 0x800#)) /= 0 =
16++#else
17+ | w`ltWord#`(int2Word# 0x800#) =
18++#endif
19+ [ W8#(w`uncheckedShiftRL#`6#
20+ `or#`(int2Word# 0xc0#))
21+ , W8#(w`and#`(int2Word# 0x3f#)
22+ `or#`(int2Word# 0x80#))
23+ ] : encodeUTF8' xs
24++#if MIN_VERSION_base(4,7,0)
25++ | I# (w`ltWord#`(int2Word# 0xf0000#)) /= 0 =
26++#else
27+ | w`ltWord#`(int2Word# 0xf0000#) =
28++#endif
29+ [ W8#(w`uncheckedShiftRL#`12#
30+ `or#`(int2Word# 0xe0#))
31+ , W8#(w`uncheckedShiftRL#`6#
32+@@ -268,7 +280,11 @@
33+ , W8#(w`and#`(int2Word# 0x3f#)
34+ `or#`(int2Word# 0x80#))
35+ ] : encodeUTF8' xs
36++#if MIN_VERSION_base(4,7,0)
37++ | I# (w`ltWord#`(int2Word# 0xe00000#)) /= 0 =
38++#else
39+ | w`ltWord#`(int2Word# 0xe00000#) =
40++#endif
41+ [ W8#(w`uncheckedShiftRL#`18#
42+ `or#`(int2Word# 0xf0#))
43+ , W8#(w`uncheckedShiftRL#`12#