protocol-buffers-2.4.12: Parse Google Protocol Buffer specifications

Safe HaskellNone
LanguageHaskell98

Text.ProtocolBuffers.Identifiers

Description

This modules colelct utility routines related to the different incarnations of identifiers in the code. The basic identifier is always ASCII, but because of the self generated DescriptorProto data structures it is stored in Utf8 tagged lazy bytestrings.

An identifier is a non-empty ASCII string made of [a-zA-Z0-9_] where the first character is never in [0-9].

A field is a mangled identifer that is a valid Haskell name that begins with lower case, and which may have a single quote at the end if needed to avoid a reserved word. These may also start with '_', though just a "_" is mangled to "_'".

A 'module' is a mangled identifier that is a valid Haskell name that begins with upper case. These never have a single quote. A leading '_' is replaced with a leading "U'_" to make a valid identifier.

Synopsis

Documentation

newtype IName a Source #

Contains one identifier name

Constructors

IName 

Fields

Instances
Eq a => Eq (IName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

(==) :: IName a -> IName a -> Bool #

(/=) :: IName a -> IName a -> Bool #

Data a => Data (IName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

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

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

toConstr :: IName a -> Constr #

dataTypeOf :: IName a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (IName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

compare :: IName a -> IName a -> Ordering #

(<) :: IName a -> IName a -> Bool #

(<=) :: IName a -> IName a -> Bool #

(>) :: IName a -> IName a -> Bool #

(>=) :: IName a -> IName a -> Bool #

max :: IName a -> IName a -> IName a #

min :: IName a -> IName a -> IName a #

Read a => Read (IName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Show a => Show (IName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

showsPrec :: Int -> IName a -> ShowS #

show :: IName a -> String #

showList :: [IName a] -> ShowS #

Mangle (IName String) (FName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName String) (MName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName Utf8) (FName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName Utf8) (MName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

newtype DIName a Source #

. separated identifier which may or may start with a dot. There are never two or more .s in a row. There is always at least one identifier.

Constructors

DIName 

Fields

Instances
Eq a => Eq (DIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

(==) :: DIName a -> DIName a -> Bool #

(/=) :: DIName a -> DIName a -> Bool #

Data a => Data (DIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

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

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

toConstr :: DIName a -> Constr #

dataTypeOf :: DIName a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (DIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

compare :: DIName a -> DIName a -> Ordering #

(<) :: DIName a -> DIName a -> Bool #

(<=) :: DIName a -> DIName a -> Bool #

(>) :: DIName a -> DIName a -> Bool #

(>=) :: DIName a -> DIName a -> Bool #

max :: DIName a -> DIName a -> DIName a #

min :: DIName a -> DIName a -> DIName a #

Read a => Read (DIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Show a => Show (DIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

showsPrec :: Int -> DIName a -> ShowS #

show :: DIName a -> String #

showList :: [DIName a] -> ShowS #

Mangle (DIName Utf8) (PFName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (DIName Utf8) (PMName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

newtype FIName a Source #

Fully qualified identifier: repeated (. then identifier)

Constructors

FIName 

Fields

Instances
Eq a => Eq (FIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

(==) :: FIName a -> FIName a -> Bool #

(/=) :: FIName a -> FIName a -> Bool #

Data a => Data (FIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

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

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

toConstr :: FIName a -> Constr #

dataTypeOf :: FIName a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (FIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

compare :: FIName a -> FIName a -> Ordering #

(<) :: FIName a -> FIName a -> Bool #

(<=) :: FIName a -> FIName a -> Bool #

(>) :: FIName a -> FIName a -> Bool #

(>=) :: FIName a -> FIName a -> Bool #

max :: FIName a -> FIName a -> FIName a #

min :: FIName a -> FIName a -> FIName a #

Read a => Read (FIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Show a => Show (FIName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

showsPrec :: Int -> FIName a -> ShowS #

show :: FIName a -> String #

showList :: [FIName a] -> ShowS #

Mangle (FIName Utf8) (PFName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (FIName Utf8) (PMName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

newtype MName a Source #

Contains one module name, non-empty

Constructors

MName 

Fields

Instances
Eq a => Eq (MName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

(==) :: MName a -> MName a -> Bool #

(/=) :: MName a -> MName a -> Bool #

Data a => Data (MName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

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

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

toConstr :: MName a -> Constr #

dataTypeOf :: MName a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (MName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

compare :: MName a -> MName a -> Ordering #

(<) :: MName a -> MName a -> Bool #

(<=) :: MName a -> MName a -> Bool #

(>) :: MName a -> MName a -> Bool #

(>=) :: MName a -> MName a -> Bool #

max :: MName a -> MName a -> MName a #

min :: MName a -> MName a -> MName a #

Read a => Read (MName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Show a => Show (MName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

showsPrec :: Int -> MName a -> ShowS #

show :: MName a -> String #

showList :: [MName a] -> ShowS #

Mangle (FName String) (MName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (MName String) (FName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName String) (MName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName Utf8) (MName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

newtype FMName a Source #

Full Haskell module name: MNames separated by ., ending with a module

Constructors

FMName 

Fields

Instances
Eq a => Eq (FMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

(==) :: FMName a -> FMName a -> Bool #

(/=) :: FMName a -> FMName a -> Bool #

Data a => Data (FMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

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

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

toConstr :: FMName a -> Constr #

dataTypeOf :: FMName a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (FMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

compare :: FMName a -> FMName a -> Ordering #

(<) :: FMName a -> FMName a -> Bool #

(<=) :: FMName a -> FMName a -> Bool #

(>) :: FMName a -> FMName a -> Bool #

(>=) :: FMName a -> FMName a -> Bool #

max :: FMName a -> FMName a -> FMName a #

min :: FMName a -> FMName a -> FMName a #

Read a => Read (FMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Show a => Show (FMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

showsPrec :: Int -> FMName a -> ShowS #

show :: FMName a -> String #

showList :: [FMName a] -> ShowS #

data PMName a Source #

Parsed Haskell name ending with MName. Good contructor to use.

Constructors

PMName [MName a] (MName a) 
Instances
Eq a => Eq (PMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

(==) :: PMName a -> PMName a -> Bool #

(/=) :: PMName a -> PMName a -> Bool #

Data a => Data (PMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

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

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

toConstr :: PMName a -> Constr #

dataTypeOf :: PMName a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (PMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

compare :: PMName a -> PMName a -> Ordering #

(<) :: PMName a -> PMName a -> Bool #

(<=) :: PMName a -> PMName a -> Bool #

(>) :: PMName a -> PMName a -> Bool #

(>=) :: PMName a -> PMName a -> Bool #

max :: PMName a -> PMName a -> PMName a #

min :: PMName a -> PMName a -> PMName a #

Read a => Read (PMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Show a => Show (PMName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

showsPrec :: Int -> PMName a -> ShowS #

show :: PMName a -> String #

showList :: [PMName a] -> ShowS #

Mangle (FIName Utf8) (PMName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (DIName Utf8) (PMName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

newtype FName a Source #

Contains one field name, non-empty

Constructors

FName 

Fields

Instances
Eq a => Eq (FName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

(==) :: FName a -> FName a -> Bool #

(/=) :: FName a -> FName a -> Bool #

Data a => Data (FName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

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

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

toConstr :: FName a -> Constr #

dataTypeOf :: FName a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (FName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

compare :: FName a -> FName a -> Ordering #

(<) :: FName a -> FName a -> Bool #

(<=) :: FName a -> FName a -> Bool #

(>) :: FName a -> FName a -> Bool #

(>=) :: FName a -> FName a -> Bool #

max :: FName a -> FName a -> FName a #

min :: FName a -> FName a -> FName a #

Read a => Read (FName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Show a => Show (FName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

showsPrec :: Int -> FName a -> ShowS #

show :: FName a -> String #

showList :: [FName a] -> ShowS #

Mangle (FName String) (MName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (MName String) (FName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName String) (FName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName Utf8) (FName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

newtype FFName a Source #

Full Haskell field name: MNames separated by ., ending with a field

Constructors

FFName 

Fields

Instances
Eq a => Eq (FFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

(==) :: FFName a -> FFName a -> Bool #

(/=) :: FFName a -> FFName a -> Bool #

Data a => Data (FFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

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

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

toConstr :: FFName a -> Constr #

dataTypeOf :: FFName a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (FFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

compare :: FFName a -> FFName a -> Ordering #

(<) :: FFName a -> FFName a -> Bool #

(<=) :: FFName a -> FFName a -> Bool #

(>) :: FFName a -> FFName a -> Bool #

(>=) :: FFName a -> FFName a -> Bool #

max :: FFName a -> FFName a -> FFName a #

min :: FFName a -> FFName a -> FFName a #

Read a => Read (FFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Show a => Show (FFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

showsPrec :: Int -> FFName a -> ShowS #

show :: FFName a -> String #

showList :: [FFName a] -> ShowS #

data PFName a Source #

Parsed Haskell name ending with FName. Good constructor to use.

Constructors

PFName [MName a] (FName a) 
Instances
Eq a => Eq (PFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

(==) :: PFName a -> PFName a -> Bool #

(/=) :: PFName a -> PFName a -> Bool #

Data a => Data (PFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

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

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

toConstr :: PFName a -> Constr #

dataTypeOf :: PFName a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (PFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

compare :: PFName a -> PFName a -> Ordering #

(<) :: PFName a -> PFName a -> Bool #

(<=) :: PFName a -> PFName a -> Bool #

(>) :: PFName a -> PFName a -> Bool #

(>=) :: PFName a -> PFName a -> Bool #

max :: PFName a -> PFName a -> PFName a #

min :: PFName a -> PFName a -> PFName a #

Read a => Read (PFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Show a => Show (PFName a) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Methods

showsPrec :: Int -> PFName a -> ShowS #

show :: PFName a -> String #

showList :: [PFName a] -> ShowS #

Mangle (FIName Utf8) (PFName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (DIName Utf8) (PFName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

class Monoid a => Dotted a where Source #

This is used to abstract over Utf8 and String. The important entry point is validDI.

Methods

uncons :: a -> Maybe (Char, a) Source #

cons :: Char -> a -> a Source #

dot :: a -> a -> a Source #

validI :: a -> Maybe (IName a) Source #

validDI :: a -> Maybe (DIName a) Source #

validDI ensures the DIName is

split :: a -> [a] Source #

split returns a list of non-empty a with all . characters removed

class Mangle a b where Source #

The mangle transformation has instances for several combiantions of input and output. These allow one to construct the Haskell types of MNameFMNamePMName and FNameFFNamePFName out of the protobuf types INameDINameFIName. Currently, all the Haskell instances are for the String base type.

Methods

mangle :: a -> b Source #

Instances
Mangle (FIName Utf8) (PFName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (FIName Utf8) (PMName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (DIName Utf8) (PFName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (DIName Utf8) (PMName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (FName String) (MName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (MName String) (FName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName String) (FName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName String) (MName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName Utf8) (FName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

Mangle (IName Utf8) (MName String) Source # 
Instance details

Defined in Text.ProtocolBuffers.Identifiers

difi :: Dotted a => DIName a -> FIName a Source #

difi examines the DIName and prepend a . if absent, promoting it to a FIName.

splitDI :: Dotted a => DIName a -> [IName a] Source #

Typed split

splitFI :: Dotted a => FIName a -> [IName a] Source #

Typed split

splitFM :: Dotted a => FMName a -> [MName a] Source #

Typed split

checkDIString :: String -> Either String (Bool, [IName String]) Source #

Right (True,_) means the input is a FIName. Right (False,_) means the input is a DIName (without leading .)

This creates useful error messages for the user.

checkDIUtf8 :: Utf8 -> Either String (Bool, [IName Utf8]) Source #

Right (True,_) means the input is a FIName. Right (False,_) means the input is a DIName (without leading .)

This creates useful error messages for the user.

dotFM :: Dotted a => FMName a -> FMName a -> FMName a Source #

dotFF :: Dotted a => FMName a -> FFName a -> FFName a Source #

fqAppend :: Dotted a => FIName a -> [IName a] -> FIName a Source #