-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generator and shrink functions for testing Unicode-related software. -- @package quickcheck-unicode @version 1.0.0.1 -- | QuickCheck Generator and shrink functions for testing software that -- uses Unicode data. -- -- The default Arbitrary instance for the Char type -- intentionally generates only ASCII values. This can lead to a false -- sense of security in cases where Unicode compliance is required, as -- encodings that span multiple bytes or code units will simply not be -- exercised at all. -- -- This module deliberately avoids using the text and -- bytestring packages to avoid pulling in extra dependencies. module Test.QuickCheck.Unicode -- | A wrapper for Char and String, for which the -- Arbitrary instance generates full-Unicode characters. data Unicode a -- | Generate a Unicode code point. This has a much larger range than the -- default Arbitrary instance for Char. char :: Gen Char -- | Generate a list of Unicode code points. string :: Gen String -- | Generate a list of values. list :: Gen a -> Gen [a] -- | A weighted list of generators that favours ASCII characters, followed -- by planes 0 and 1. planes :: [(Int, Gen Int)] ascii :: Gen Int -- | Basic Multilingual Plane. plane0 :: Gen Int -- | Supplementary Multilingual Plane. plane1 :: Gen Int -- | Supplementary Ideographic Plane. plane2 :: Gen Int -- | Supplementary Special-Purpose Plane. plane14 :: Gen Int -- | Indicate whether a code point is reserved. reserved :: Int -> Bool -- | Shrink a Unicode code point. shrinkChar :: Char -> [Char] instance Eq a => Eq (Unicode a) instance Ord a => Ord (Unicode a) instance Show a => Show (Unicode a) instance Read a => Read (Unicode a) instance Arbitrary (Unicode [Char]) instance Arbitrary (Unicode Char)