-- 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.1.0


-- | 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 non-empty list of Unicode code points.
string1 :: Gen String

-- | Generate a list of values.
list :: Gen a -> Gen [a]

-- | Generate a non-empty list of values.
list1 :: 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 GHC.Read.Read a => GHC.Read.Read (Test.QuickCheck.Unicode.Unicode a)
instance GHC.Show.Show a => GHC.Show.Show (Test.QuickCheck.Unicode.Unicode a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Test.QuickCheck.Unicode.Unicode a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.QuickCheck.Unicode.Unicode a)
instance Test.QuickCheck.Arbitrary.Arbitrary (Test.QuickCheck.Unicode.Unicode GHC.Types.Char)
instance Test.QuickCheck.Arbitrary.Arbitrary (Test.QuickCheck.Unicode.Unicode [GHC.Types.Char])
