License | MIT |
---|---|
Maintainer | Paweł Nowak <pawel834@gmail.com> |
Stability | provisional |
Portability | portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Dense, total, maps parametrized by a set of keys.
- type Subset s k = Reifies s (Set k)
- newtype TotalSubsetMap s k a = TotalSubsetMap (Map k a)
- restrict :: forall k a r. Map k a -> (forall s. Subset s k => TotalSubsetMap s k a -> r) -> r
Documentation
newtype TotalSubsetMap s k a Source
A total map from a subset s of keys k to values a, e.g. a restriction
of a partial function k -> a
to a subset of its domain on which the
function is defined.
Most functions are derived from Map
.
n is equal to the size of the key set.
TotalSubsetMap (Map k a) |
restrict :: forall k a r. Map k a -> (forall s. Subset s k => TotalSubsetMap s k a -> r) -> r Source
Restrict a partial map to a total map.
Complexity: O(n)