on master help sign in
Wow, typo(s) of the week! Or do I mean the decade?

This bug has been latent for 6.75 years, and lay dormant all that time because the Arbitrary instance for Char only generates ASCII. I just switched the Arbitrary instance for Text to generate a wider range of Unicode code points, thanks to the quickcheck-unicode package. (I'm afraid I don't recall why I didn't do this much earlier...)

commit640b26b64dba00d5482111bc28203050d0bfe238 authorBryan O'Sullivan <bos@serpentine.com> dateSat 20 May 2017, 20:59 (9 years ago) parent9593095
1 file changed+1−1
Data/Text/Foreign.hs+1−1
Data/Text/Foreign.hs+1−1
@@ -108,7 +108,7 @@ takeWord16 (I16 n) t@(Text arr off len)
108108 | n >= len || m >= len = t
109109 | otherwise = Text arr off m
110110 where
111− m | w < 0xDB00 || w > 0xD8FF = n
111+ m | w < 0xD800 || w > 0xDBFF = n
112112 | otherwise = n+1
113113 w = A.unsafeIndex arr (off+n-1)
114114