{-# LANGUAGE CPP #-}
module Test.SmallCheck.Series.Text
(
replicateA
, replicateNull
, replicateChar
, enumAlphabet
, enumChars
, enumString
, jack
, enumNonBmp
) where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>))
#endif
import Data.Text (Text)
import qualified Data.Text.Lazy as L (toStrict)
import Test.SmallCheck.Series
import qualified Test.SmallCheck.Series.Text.Lazy as L.Series
replicateA :: Series m Text
replicateA :: Series m Text
replicateA = Text -> Text
L.toStrict (Text -> Text) -> Series m Text -> Series m Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Series m Text
forall (m :: * -> *). Series m Text
L.Series.replicateA
replicateNull :: Series m Text
replicateNull :: Series m Text
replicateNull = Text -> Text
L.toStrict (Text -> Text) -> Series m Text -> Series m Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Series m Text
forall (m :: * -> *). Series m Text
L.Series.replicateNull
replicateChar :: Char -> Series m Text
replicateChar :: Char -> Series m Text
replicateChar = (Text -> Text) -> Series m Text -> Series m Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Text -> Text
L.toStrict (Series m Text -> Series m Text)
-> (Char -> Series m Text) -> Char -> Series m Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Char -> Series m Text
forall (m :: * -> *). Char -> Series m Text
L.Series.replicateChar
enumAlphabet :: Series m Text
enumAlphabet :: Series m Text
enumAlphabet = Text -> Text
L.toStrict (Text -> Text) -> Series m Text -> Series m Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Series m Text
forall (m :: * -> *). Series m Text
L.Series.enumAlphabet
enumChars :: Series m Text
enumChars :: Series m Text
enumChars = Text -> Text
L.toStrict (Text -> Text) -> Series m Text -> Series m Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Series m Text
forall (m :: * -> *). Series m Text
L.Series.enumChars
enumString :: String -> Series m Text
enumString :: String -> Series m Text
enumString = (Text -> Text) -> Series m Text -> Series m Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Text -> Text
L.toStrict (Series m Text -> Series m Text)
-> (String -> Series m Text) -> String -> Series m Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Series m Text
forall (m :: * -> *). String -> Series m Text
L.Series.enumString
jack :: Series m Text
jack :: Series m Text
jack = Text -> Text
L.toStrict (Text -> Text) -> Series m Text -> Series m Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Series m Text
forall (m :: * -> *). Series m Text
L.Series.jack
enumNonBmp :: Series m Text
enumNonBmp :: Series m Text
enumNonBmp = String -> Series m Text
forall (m :: * -> *). String -> Series m Text
enumString [Char
'\0',Char
'\x10000'..Char
'\xF0000']