Conference item
Understanding Idiomatic Traversals Backwards and Forwards
- Abstract:
- We present new ways of reasoning about a particular class of effectful Haskell programs, namely those expressed as idiomatic traversals. Starting out with a specific problem about labelling and unlabelling binary trees, we extract a general inversion law, applicable to any monad, relating a traversal over the elements of an arbitrary traversable type to a traversal that goes in the opposite direction. This law can be invoked to show that, in a suitable sense, unlabelling is the inverse of labelling. The inversion law, as well as a number of other properties of idiomatic traversals, is a corollary of a more general theorem characterising traversable functors as finitary containers: an arbitrary traversable object can be decomposed uniquely into shape and contents, and traversal be understood in terms of those. Proof of the theorem involves the properties of traversal in a special idiom related to the free applicative functor.
Actions
Access Document
- Files:
-
-
(Preview, pdf, 271.3KB, Terms of use)
-
Authors
- Host title:
- Haskell Symposium
- Publication date:
- 2013-09-01
- UUID:
-
uuid:09b93206-8dda-49f9-bdec-9ee409a191f6
- Local pid:
-
cs:7024
- Deposit date:
-
2015-03-04
- ARK identifier:
Terms of use
- Copyright date:
- 2013
If you are the owner of this record, you can report an update to it here: Report update to this record