Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type WitnessMapOf = WitnessMapFor Identity
- emptyWitnessMapOf :: 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 :: [SomeOf w] -> WitnessMapOf w
- witnessMapOfToList :: 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 :: 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 :: [SomeOf w] -> WitnessMapOf w Source #
Create a dictionary from a list of witness/value pairs
witnessMapOfToList :: WitnessMapOf w -> [SomeOf w] Source #