Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data TypeMap x
- type family Item x t
- null :: TypeMap x -> Bool
- insert :: forall t x proxy. Typeable t => proxy t -> Item x t -> TypeMap x -> TypeMap x
- lookup :: forall t x proxy. Typeable t => proxy t -> TypeMap x -> Maybe (Item x t)
- map :: forall x y. (forall t. Typeable t => Proxy t -> Item x t -> Item y t) -> TypeMap x -> TypeMap y
- traverse :: forall f x y. Applicative f => (forall t. Typeable t => Proxy t -> Item x t -> f (Item y t)) -> TypeMap x -> f (TypeMap y)
- data OfType a
Documentation
An extensible type family mapping types (as keys) to types of values,
parameterized by types x
.
insert :: forall t x proxy. Typeable t => proxy t -> Item x t -> TypeMap x -> TypeMap x Source #
Insert an element indexed by type t
.
lookup :: forall t x proxy. Typeable t => proxy t -> TypeMap x -> Maybe (Item x t) Source #
Lookup an element indexed by type t
.
map :: forall x y. (forall t. Typeable t => Proxy t -> Item x t -> Item y t) -> TypeMap x -> TypeMap y Source #
Map a function on all elements.