language-rust-0.1.0.0: Parsing and pretty printing of Rust code

Copyright(c) Alec Theriault 2017-2018
LicenseBSD-style
Maintaineralec.theriault@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Language.Rust.Data.Ident

Description

Data structure behind identifiers.

Synopsis

Documentation

data Ident Source #

An identifier

Constructors

Ident 

Fields

  • name :: Name

    payload of the identifier

  • hash :: !Int

    hash for quick comparision

Instances

Eq Ident Source #

Uses hash to short-circuit

Methods

(==) :: Ident -> Ident -> Bool #

(/=) :: Ident -> Ident -> Bool #

Data Ident Source # 

Methods

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

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

toConstr :: Ident -> Constr #

dataTypeOf :: Ident -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Ident Source #

Uses hash to short-circuit

Methods

compare :: Ident -> Ident -> Ordering #

(<) :: Ident -> Ident -> Bool #

(<=) :: Ident -> Ident -> Bool #

(>) :: Ident -> Ident -> Bool #

(>=) :: Ident -> Ident -> Bool #

max :: Ident -> Ident -> Ident #

min :: Ident -> Ident -> Ident #

Show Ident Source #

Shows the identifier as a string (for use with -XOverloadedStrings)

Methods

showsPrec :: Int -> Ident -> ShowS #

show :: Ident -> String #

showList :: [Ident] -> ShowS #

IsString Ident Source # 

Methods

fromString :: String -> Ident #

Generic Ident Source # 

Associated Types

type Rep Ident :: * -> * #

Methods

from :: Ident -> Rep Ident x #

to :: Rep Ident x -> Ident #

Semigroup Ident Source # 

Methods

(<>) :: Ident -> Ident -> Ident #

sconcat :: NonEmpty Ident -> Ident #

stimes :: Integral b => b -> Ident -> Ident #

Monoid Ident Source # 

Methods

mempty :: Ident #

mappend :: Ident -> Ident -> Ident #

mconcat :: [Ident] -> Ident #

NFData Ident Source # 

Methods

rnf :: Ident -> () #

Resolve Ident Source # 
Pretty Ident Source # 
type Rep Ident Source # 
type Rep Ident = D1 (MetaData "Ident" "Language.Rust.Data.Ident" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) (C1 (MetaCons "Ident" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "name") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)) (S1 (MetaSel (Just Symbol "hash") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Int))))

mkIdent :: String -> Ident Source #

Smart constructor for making an Ident.

type Name = String Source #

The payload of an identifier