HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulequickcheck-unicode-1.0.1.0Haskell98

Test.QuickCheck.Unicode

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.

Contents
  1. Newtype wrapper for convenience
  2. Generators
  3. Helpers
  4. Basic generators
  5. Predicates
  6. Shrinking functions
Synopsis

Newtype wrapper for convenience

newtypenewtype Unicode a

A wrapper for Char and String, for which the Arbitrary instance generates full-Unicode characters.

Instances6Eq, Ord, Read, Show, Arbitrary
  • Eq a => Eq (Unicode a)Defined in quickcheck-unicode-1.0.1.0 · Test.QuickCheck.Unicode
  • Ord a => Ord (Unicode a)Defined in quickcheck-unicode-1.0.1.0 · Test.QuickCheck.Unicode
  • Read a => Read (Unicode a)Defined in quickcheck-unicode-1.0.1.0 · Test.QuickCheck.Unicode
  • Show a => Show (Unicode a)Defined in quickcheck-unicode-1.0.1.0 · Test.QuickCheck.Unicode
  • Arbitrary (Unicode Char)Defined in quickcheck-unicode-1.0.1.0 · Test.QuickCheck.Unicode
  • Arbitrary (Unicode [Char])Defined in quickcheck-unicode-1.0.1.0 · Test.QuickCheck.Unicode

Generators

Helpers

Basic generators

valueplanes :: [(Int, Gen Int)]

A weighted list of generators that favours ASCII characters, followed by planes 0 and 1.

Predicates

Shrinking functions