Dependent maps:
k is a GADT-like thing with a facility for
rediscovering its type parameter, elements of which function as
identifiers tagged with the type of the thing they identify. Real
GADTs are one useful instantiation of
k, as are
Tags
from
Data.Unique.Tag in the 'prim-uniq' package.
Semantically,
DMap k f is equivalent to a set of
DSum k f where no two elements have the same tag.
More informally,
DMap is to dependent products as
Map is
to
(->). Thus it could also be thought of as a partial (in
the sense of "partial function") dependent product.