Safe Haskell | None |
---|---|
Language | Haskell98 |
Key conversion proxy.
Wraps an index to expose the desired key type.
The conversion is defined by the Bijection
implementation.
This can be used for simple conversions like Text
to String
or normalization and compression.
- newtype KeyProxyIndex toType impl = KeyProxyIx {
- keyProxyIx :: impl
Documentation
newtype KeyProxyIndex toType impl Source
Key conversion proxy.
toType
is the desired/exposed key type, followed by the wrapped index type.
There has to be a corresponding Bijection
instance:
instance Bijection (IKey impl v) toType where ...
KeyProxyIx | |
|
Eq impl => Eq (KeyProxyIndex toType impl) | |
Show impl => Show (KeyProxyIndex toType impl) | |
Binary impl => Binary (KeyProxyIndex toType impl) | |
NFData impl => NFData (KeyProxyIndex toType impl) | |
IndexValue (IVal impl) => Index (KeyProxyIndex toType impl) | |
type IKey (KeyProxyIndex toType impl) = toType | |
type IVal (KeyProxyIndex toType impl) = IVal impl | |
type ICon (KeyProxyIndex toType impl) = (Index impl, ICon impl, Bijection (IKey impl) toType) |