text-1.2.3.0: An efficient packed Unicode text type.

Safe HaskellNone
LanguageHaskell98

Data.Text.Internal

Synopsis

Documentation

newtype Text Source #

Constructors

Text JSString 
Instances
IsList Text Source #

Since: 1.2.0.0

Instance details

Defined in Data.Text

Associated Types

type Item Text :: Type Source #

Eq Text Source # 
Instance details

Defined in Data.Text

Methods

(==) :: Text -> Text -> Bool Source #

(/=) :: Text -> Text -> Bool Source #

Data Text Source #

This instance preserves data abstraction at the cost of inefficiency. We omit reflection services for the sake of data abstraction.

This instance was created by copying the updated behavior of Data.Set.Set and Data.Map.Map. If you feel a mistake has been made, please feel free to submit improvements.

The original discussion is archived here: could we get a Data instance for Data.Text.Text?

The followup discussion that changed the behavior of Set and Map is archived here: Proposal: Allow gunfold for Data.Map, ...

Instance details

Defined in Data.Text

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Text -> c Text Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Text Source #

toConstr :: Text -> Constr Source #

dataTypeOf :: Text -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Text) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Text) Source #

gmapT :: (forall b. Data b => b -> b) -> Text -> Text Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Text -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Text -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Text -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Text -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Text -> m Text Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Text -> m Text Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Text -> m Text Source #

Ord Text Source # 
Instance details

Defined in Data.Text

Read Text Source # 
Instance details

Defined in Data.Text

Show Text Source # 
Instance details

Defined in Data.Text.Internal

IsString Text Source # 
Instance details

Defined in Data.Text

Semigroup Text Source #

Non-orphan Semigroup instance only defined for base-4.9.0.0 and later; orphan instances for older GHCs are provided by the semigroups package

Since: 1.2.2.0

Instance details

Defined in Data.Text

Monoid Text Source # 
Instance details

Defined in Data.Text

PrintfArg Text Source #

Only defined for base-4.7.0.0 and later

Since: 1.2.2.0

Instance details

Defined in Data.Text

Binary Text Source #

Since: 1.2.1.0

Instance details

Defined in Data.Text

NFData Text Source # 
Instance details

Defined in Data.Text

Methods

rnf :: Text -> () Source #

PToJSVal Text Source # 
Instance details

Defined in Data.Text.Internal

Methods

pToJSVal :: Text -> JSVal Source #

PFromJSVal Text Source # 
Instance details

Defined in Data.Text.Internal

ToJSVal Text Source # 
Instance details

Defined in Data.Text.Internal

FromJSVal Text Source # 
Instance details

Defined in Data.Text.Internal

type Item Text Source # 
Instance details

Defined in Data.Text

type Item Text = Char

text :: Array -> Int -> Int -> Text Source #

Construct a Text without invisibly pinning its byte array in memory if its length has dwindled to zero.

mul :: Int -> Int -> Int infixl 7 Source #

Checked multiplication. Calls error if the result would overflow.

mul64 :: Int64 -> Int64 -> Int64 infixl 7 Source #

Checked multiplication. Calls error if the result would overflow.

mul32 :: Int32 -> Int32 -> Int32 infixl 7 Source #

Checked multiplication. Calls error if the result would overflow.

firstf :: (a -> c) -> Maybe (a, b) -> Maybe (c, b) Source #

Apply a function to the first element of an optional pair.