| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Data.Type.Witness.Specific.WitnessMap.Of
Synopsis
- type WitnessMapOf = WitnessMapFor Identity
- emptyWitnessMapOf :: forall (w :: Type -> Type). WitnessMapOf w
- witnessMapOfLookup :: TestEquality w => w a -> WitnessMapOf w -> Maybe a
- witnessMapOfModify :: TestEquality w => w a -> (a -> a) -> WitnessMapOf w -> WitnessMapOf w
- witnessMapOfReplace :: TestEquality w => w a -> a -> WitnessMapOf w -> WitnessMapOf w
- witnessMapOfSingle :: w a -> a -> WitnessMapOf w
- witnessMapOfFold :: Monoid m => WitnessMapOf w -> (forall a. w a -> a -> m) -> m
- witnessMapOfAdd :: w a -> a -> WitnessMapOf w -> WitnessMapOf w
- witnessMapOfRemove :: TestEquality w => w a -> WitnessMapOf w -> WitnessMapOf w
- witnessMapOfFromList :: forall (w :: Type -> Type). [SomeOf w] -> WitnessMapOf w
- witnessMapOfToList :: forall (w :: Type -> Type). WitnessMapOf w -> [SomeOf w]
Documentation
type WitnessMapOf = WitnessMapFor Identity Source #
A dictionary that is heterogenous up to its simple witness type w.
Witnesses are the keys of the dictionary, and the values they witness are the values of the dictionary.
emptyWitnessMapOf :: forall (w :: Type -> Type). WitnessMapOf w Source #
An empty dictionary.
witnessMapOfLookup :: TestEquality w => w a -> WitnessMapOf w -> Maybe a Source #
Look up the first value in the dictionary that matches the given witness.
witnessMapOfModify :: TestEquality w => w a -> (a -> a) -> WitnessMapOf w -> WitnessMapOf w Source #
Modify the first value in the dictionary that matches a particular witness.
witnessMapOfReplace :: TestEquality w => w a -> a -> WitnessMapOf w -> WitnessMapOf w Source #
Replace the first value in the dictionary that matches the witness
witnessMapOfSingle :: w a -> a -> WitnessMapOf w Source #
witnessMapOfFold :: Monoid m => WitnessMapOf w -> (forall a. w a -> a -> m) -> m Source #
witnessMapOfAdd :: w a -> a -> WitnessMapOf w -> WitnessMapOf w Source #
Add a witness and value as the first entry in the dictionary.
witnessMapOfRemove :: TestEquality w => w a -> WitnessMapOf w -> WitnessMapOf w Source #
Remove the first entry in the dictionary that matches the given witness.
witnessMapOfFromList :: forall (w :: Type -> Type). [SomeOf w] -> WitnessMapOf w Source #
Create a dictionary from a list of witness/value pairs
witnessMapOfToList :: forall (w :: Type -> Type). WitnessMapOf w -> [SomeOf w] Source #