-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Generator and shrink functions for testing
Unicode-related software.
--   
--   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 <a>Arbitrary</a> instance for the <a>Char</a> 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 <tt>text</tt> and
--   <tt>bytestring</tt> packages to avoid pulling in extra dependencies.
module Test.QuickCheck.Unicode

-- | A wrapper for <a>Char</a> and <a>String</a>, for which the
--   <a>Arbitrary</a> instance generates full-Unicode characters.
data Unicode a

-- | Generate a Unicode code point. This has a much larger range than the
--   default <a>Arbitrary</a> instance for <a>Char</a>.
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)
