Development.IDE.Graph.Internal.Key

hls-graph-2.9.0.0: Haskell Language Server internal graph API

Safe Haskell | None
Language | GHC2021

Development.IDE.Graph.Internal.Key

Contents

- KeyMap
- KeySet

Synopsis

- data Key
- data KeyValue = (Typeable a, Hashable a, Show a) => KeyValue a Text
- pattern Key :: () => (Typeable a, Hashable a, Show a) => a -> Key
- newKey :: (Typeable a, Hashable a, Show a) => a -> Key
- renderKey :: Key -> Text
- data KeyMap a
- mapKeyMap :: (a -> b) -> KeyMap a -> KeyMap b
- insertKeyMap :: Key -> a -> KeyMap a -> KeyMap a
- lookupKeyMap :: Key -> KeyMap a -> Maybe a
- lookupDefaultKeyMap :: a -> Key -> KeyMap a -> a
- fromListKeyMap :: [(Key, a)] -> KeyMap a
- fromListWithKeyMap :: (a -> a -> a) -> [(Key, a)] -> KeyMap a
- toListKeyMap :: KeyMap a -> [(Key, a)]
- elemsKeyMap :: KeyMap a -> [a]
- restrictKeysKeyMap :: KeyMap a -> KeySet -> KeyMap a
- data KeySet
- nullKeySet :: KeySet -> Bool
- insertKeySet :: Key -> KeySet -> KeySet
- memberKeySet :: Key -> KeySet -> Bool
- toListKeySet :: KeySet -> [Key]
- lengthKeySet :: KeySet -> Int
- filterKeySet :: (Key -> Bool) -> KeySet -> KeySet
- singletonKeySet :: Key -> KeySet
- fromListKeySet :: [Key] -> KeySet
- deleteKeySet :: Key -> KeySet -> KeySet
- differenceKeySet :: KeySet -> KeySet -> KeySet

# Documentation

data Key #

#### Instances

Instances details

Show Key # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods showsPrec :: Int -> Key -> ShowS # show :: Key -> String # showList :: [Key] -> ShowS #
Eq Key # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods (==) :: Key -> Key -> Bool # (/=) :: Key -> Key -> Bool #
Hashable Key # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods hashWithSalt :: Int -> Key -> Int # hash :: Key -> Int #

data KeyValue #

Constructors

(Typeable a, Hashable a, Show a) => KeyValue a Text |

#### Instances

Instances details

Show KeyValue # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods showsPrec :: Int -> KeyValue -> ShowS # show :: KeyValue -> String # showList :: [KeyValue] -> ShowS #
Eq KeyValue # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods (==) :: KeyValue -> KeyValue -> Bool # (/=) :: KeyValue -> KeyValue -> Bool #
Hashable KeyValue # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods hashWithSalt :: Int -> KeyValue -> Int # hash :: KeyValue -> Int #

pattern Key :: () => (Typeable a, Hashable a, Show a) => a -> Key #

newKey :: (Typeable a, Hashable a, Show a) => a -> Key #

renderKey :: Key -> Text #

# KeyMap

data KeyMap a #

#### Instances

Instances details

Monoid (KeyMap a) # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods mempty :: KeyMap a # mappend :: KeyMap a -> KeyMap a -> KeyMap a # mconcat :: [KeyMap a] -> KeyMap a #
Semigroup (KeyMap a) # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods (<>) :: KeyMap a -> KeyMap a -> KeyMap a # sconcat :: NonEmpty (KeyMap a) -> KeyMap a # stimes :: Integral b => b -> KeyMap a -> KeyMap a #
Show a => Show (KeyMap a) # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods showsPrec :: Int -> KeyMap a -> ShowS # show :: KeyMap a -> String # showList :: [KeyMap a] -> ShowS #
Eq a => Eq (KeyMap a) # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods (==) :: KeyMap a -> KeyMap a -> Bool # (/=) :: KeyMap a -> KeyMap a -> Bool #
Ord a => Ord (KeyMap a) # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods compare :: KeyMap a -> KeyMap a -> Ordering # (<) :: KeyMap a -> KeyMap a -> Bool # (<=) :: KeyMap a -> KeyMap a -> Bool # (>) :: KeyMap a -> KeyMap a -> Bool # (>=) :: KeyMap a -> KeyMap a -> Bool # max :: KeyMap a -> KeyMap a -> KeyMap a # min :: KeyMap a -> KeyMap a -> KeyMap a #

mapKeyMap :: (a -> b) -> KeyMap a -> KeyMap b #

insertKeyMap :: Key -> a -> KeyMap a -> KeyMap a #

lookupKeyMap :: Key -> KeyMap a -> Maybe a #

lookupDefaultKeyMap :: a -> Key -> KeyMap a -> a #

fromListKeyMap :: [(Key, a)] -> KeyMap a #

fromListWithKeyMap :: (a -> a -> a) -> [(Key, a)] -> KeyMap a #

toListKeyMap :: KeyMap a -> [(Key, a)] #

elemsKeyMap :: KeyMap a -> [a] #

restrictKeysKeyMap :: KeyMap a -> KeySet -> KeyMap a #

# KeySet

data KeySet #

#### Instances

Instances details

NFData KeySet # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods rnf :: KeySet -> () #
Monoid KeySet # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods mempty :: KeySet # mappend :: KeySet -> KeySet -> KeySet # mconcat :: [KeySet] -> KeySet #
Semigroup KeySet # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods (<>) :: KeySet -> KeySet -> KeySet # sconcat :: NonEmpty KeySet -> KeySet # stimes :: Integral b => b -> KeySet -> KeySet #
Show KeySet # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods showsPrec :: Int -> KeySet -> ShowS # show :: KeySet -> String # showList :: [KeySet] -> ShowS #
Eq KeySet # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods (==) :: KeySet -> KeySet -> Bool # (/=) :: KeySet -> KeySet -> Bool #
Ord KeySet # |
Instance details Defined in Development.IDE.Graph.Internal.Key Methods compare :: KeySet -> KeySet -> Ordering # (<) :: KeySet -> KeySet -> Bool # (<=) :: KeySet -> KeySet -> Bool # (>) :: KeySet -> KeySet -> Bool # (>=) :: KeySet -> KeySet -> Bool # max :: KeySet -> KeySet -> KeySet # min :: KeySet -> KeySet -> KeySet #

nullKeySet :: KeySet -> Bool #

insertKeySet :: Key -> KeySet -> KeySet #

memberKeySet :: Key -> KeySet -> Bool #

toListKeySet :: KeySet -> [Key] #

lengthKeySet :: KeySet -> Int #

filterKeySet :: (Key -> Bool) -> KeySet -> KeySet #

singletonKeySet :: Key -> KeySet #

fromListKeySet :: [Key] -> KeySet #

deleteKeySet :: Key -> KeySet -> KeySet #

differenceKeySet :: KeySet -> KeySet -> KeySet #