Results 1 -
1 of
1
Distributive Laws of Directed Containers [Extended Abstract]
"... Containers [1] are an elegant representation of a wide class of datatypes in terms of shapes and positions in shapes. In our FoSSaCS 2012 work [2], we introduced directed containers as a special case to account for the common situation where every position in a shape determines another shape, inform ..."
Abstract
- Add to MetaCart
Containers [1] are an elegant representation of a wide class of datatypes in terms of shapes and positions in shapes. In our FoSSaCS 2012 work [2], we introduced directed containers as a special case to account for the common situation where every position in a shape determines another shape, informally the subshape rooted by that position; some examples being the datatypes of nonempty lists and trees and the corresponding zipper datatypes. While containers interpret into set functors via a fully faithful monoidal functor, directed containers interpret into comonads. Further, it is also true that every comonad whose underlying functor is a container is represented by a directed container. In this paper, we develop a characterization of distributive laws between such comonads. A container S ⊳ P is given by a set S (of shapes) and a shape-indexed family P: S → Set (of positions). A morphism between containers S ⊳ P and S ′ ⊳ P ′ is a pair t ⊳ q of maps t: S → S ′ and q: Π{s: S}. P ′ (t s) → P s. (We use Agda’s syntax of braces for implicit arguments.) Containers form a

