Cabal-2.0.1.1: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell2010

Distribution.Utils.ShortText

Contents

Synopsis

ShortText type

data ShortText Source #

Compact representation of short Strings

The data is stored internally as UTF8 in an ShortByteString when compiled against bytestring >= 0.10.4, and otherwise the fallback is to use plain old non-compat '[Char]'.

Note: This type is for internal uses (such as e.g. PackageName) and shall not be exposed in Cabal's API

Since: 2.0.0.2

Instances
Eq ShortText Source # 
Instance details
Data ShortText Source # 
Instance details

Methods

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

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

toConstr :: ShortText -> Constr #

dataTypeOf :: ShortText -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord ShortText Source # 
Instance details
Read ShortText Source # 
Instance details
Show ShortText Source # 
Instance details
IsString ShortText Source # 
Instance details
Generic ShortText Source # 
Instance details

Associated Types

type Rep ShortText :: * -> * #

Semigroup ShortText Source # 
Instance details
Monoid ShortText Source # 
Instance details
Binary ShortText Source # 
Instance details
NFData ShortText Source # 
Instance details

Methods

rnf :: ShortText -> () #

type Rep ShortText Source # 
Instance details
type Rep ShortText = D1 * (MetaData "ShortText" "Distribution.Utils.ShortText" "Cabal-2.0.1.1-99tbaCBn5in8ykZQ2Yxqis" True) (C1 * (MetaCons "ST" PrefixI True) (S1 * (MetaSel (Just Symbol "unST") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ShortByteString)))

internal utilities

decodeStringUtf8 :: [Word8] -> String Source #

Decode String from UTF8-encoded octets.

Invalid data will be decoded as the replacement character (U+FFFD)

See also encodeStringUtf8

encodeStringUtf8 :: String -> [Word8] Source #

Encode String to a list of UTF8-encoded octets

See also decodeUtf8