@@ -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
5+ -- can use Word# literalls
7+ encodeUTF8' ((W32# w):xs)
8++#if MIN_VERSION_base(4,7,0)
9++ | I# (w`ltWord#`(int2Word# 0x80#)) /= 0 =
11+ | w`ltWord#`(int2Word# 0x80#) =
13+ [W8# w] : encodeUTF8' xs
14++#if MIN_VERSION_base(4,7,0)
15++ | I# (w`ltWord#`(int2Word# 0x800#)) /= 0 =
17+ | w`ltWord#`(int2Word# 0x800#) =
19+ [ W8#(w`uncheckedShiftRL#`6#
20+ `or#`(int2Word# 0xc0#))
21+ , W8#(w`and#`(int2Word# 0x3f#)
22+ `or#`(int2Word# 0x80#))
24++#if MIN_VERSION_base(4,7,0)
25++ | I# (w`ltWord#`(int2Word# 0xf0000#)) /= 0 =
27+ | w`ltWord#`(int2Word# 0xf0000#) =
29+ [ W8#(w`uncheckedShiftRL#`12#
30+ `or#`(int2Word# 0xe0#))
31+ , W8#(w`uncheckedShiftRL#`6#
33+ , W8#(w`and#`(int2Word# 0x3f#)
34+ `or#`(int2Word# 0x80#))
36++#if MIN_VERSION_base(4,7,0)
37++ | I# (w`ltWord#`(int2Word# 0xe00000#)) /= 0 =
39+ | w`ltWord#`(int2Word# 0xe00000#) =
41+ [ W8#(w`uncheckedShiftRL#`18#
42+ `or#`(int2Word# 0xf0#))
43+ , W8#(w`uncheckedShiftRL#`12#