ghc-lib-parser-8.8.3.20200412: The GHC API, decoupled from GHC versions

Safe HaskellNone
LanguageHaskell2010

Avail

Synopsis

Documentation

type Avails = [AvailInfo] Source #

A collection of AvailInfo - several things that are "available"

data AvailInfo Source #

Records what things are "available", i.e. in scope

Constructors

Avail Name

An ordinary identifier in scope

AvailTC

A type or class in scope

The AvailTC Invariant: If the type or class is itself to be in scope, it must be first in this list. Thus, typically:

AvailTC Eq [Eq, ==, \/=] []

Fields

  • Name

    The name of the type or class

  • [Name]

    The available pieces of type or class, excluding field selectors.

  • [FieldLabel]

    The record fields of the type (see Note [Representing fields in AvailInfo]).

Instances
Eq AvailInfo Source #

Used when deciding if the interface has changed

Instance details

Defined in Avail

Data AvailInfo Source # 
Instance details

Defined in Avail

Methods

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

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

toConstr :: AvailInfo -> Constr #

dataTypeOf :: AvailInfo -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable AvailInfo Source # 
Instance details

Defined in Avail

Binary AvailInfo Source # 
Instance details

Defined in Avail

availName :: AvailInfo -> Name Source #

Just the main name made available, i.e. not the available pieces of type or class brought into scope by the GenAvailInfo

availNames :: AvailInfo -> [Name] Source #

All names made available by the availability information (excluding overloaded selectors)

availNonFldNames :: AvailInfo -> [Name] Source #

Names for non-fields made available by the availability information

availNamesWithSelectors :: AvailInfo -> [Name] Source #

All names made available by the availability information (including overloaded selectors)

availFlds :: AvailInfo -> [FieldLabel] Source #

Fields made available by the availability information

availNamesWithOccs :: AvailInfo -> [(Name, OccName)] Source #

Names made available by the availability information, paired with the OccName used to refer to each one.

When DuplicateRecordFields is in use, the Name may be the mangled name of a record selector (e.g. $sel:foo:MkT) while the OccName will be the label of the field (e.g. foo).

See Note [Representing fields in AvailInfo].

stableAvailCmp :: AvailInfo -> AvailInfo -> Ordering Source #

Compare lexicographically

trimAvail :: AvailInfo -> Name -> AvailInfo Source #

trims an AvailInfo to keep only a single name

filterAvail :: (Name -> Bool) -> AvailInfo -> [AvailInfo] -> [AvailInfo] Source #

filters an AvailInfo by the given predicate

filterAvails :: (Name -> Bool) -> [AvailInfo] -> [AvailInfo] Source #

filters AvailInfos by the given predicate

nubAvails :: [AvailInfo] -> [AvailInfo] Source #

Combines AvailInfos from the same family avails may have several items with the same availName E.g import Ix( Ix(..), index ) will give Ix(Ix,index,range) and Ix(index) We want to combine these; addAvail does that