thentos-core-0.0.1.1: The swiss army knife of privacy-preserving identity management

Safe HaskellNone
LanguageHaskell2010

Thentos.Util

Synopsis

Documentation

mailEncode :: ConvertibleStrings s SBS => s -> ST

Encode a bytestring in such a way that it can be used as local part in an email address. This is done by percent-encoding the input in such a way that it could be used in a query string and additionally replacing every "." by "+", since the local address part cannot contain multiple subsequent dots or start or end with a dot.

cshow :: (Show a, ConvertibleStrings String b) => a -> b

Convertible show.

readsPrecEnumBoundedShow :: (Enum a, Bounded a, Show a) => Int -> String -> [(a, String)]

Generic readsPrec for enumerable types.

fmapLM :: (Monad m, Functor m) => (a -> m b) -> Either a r -> m (Either b r)

Like fmapL from Data.EitherR, but with the update of the left value constructed in an impure action.

fmapLTM :: (Monad m, Functor m) => (a -> m b) -> EitherT a m r -> EitherT b m r

Like fmapLT from Data.EitherR, but with the update of the left value constructed in an impure action.