Functor is to Lens as Applicative is to Biplate: Introducing Multiplate

Computer Science – Programming Languages

Scientific paper

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

To appear in ACM SIGPLAN 7th Workshop on Generic Programming, Tokyo, 18th September 2011

Scientific paper

This paper gives two new categorical characterisations of lenses: one as a coalgebra of the store comonad, and the other as a monoidal natural transformation on a category of a certain class of coalgebras. The store comonad of the first characterisation can be generalized to a Cartesian store comonad, and the coalgebras of this Cartesian store comonad turn out to be exactly the Biplates of the Uniplate generic programming library. On the other hand, the monoidal natural transformations on functors can be generalized to work on a category of more specific coalgebras. This generalization turns out to be the type of compos from the Compos generic programming library. A theorem, originally conjectured by van Laarhoven, proves that these two generalizations are isomorphic, thus the core data types of the Uniplate and Compos libraries supporting generic program on single recursive types are the same. Both the Uniplate and Compos libraries generalize this core functionality to support mutually recursive types in different ways. This paper proposes a third extension to support mutually recursive data types that is as powerful as Compos and as easy to use as Uniplate. This proposal, called Multiplate, only requires rank 3 polymorphism in addition to the normal type class mechanism of Haskell.

No associations

LandOfFree

Say what you really think

Search LandOfFree.com for scientists and scientific papers. Rate them and share your experience with other people.

Rating

Functor is to Lens as Applicative is to Biplate: Introducing Multiplate does not yet have a rating. At this time, there are no reviews or comments for this scientific paper.

If you have personal experience with Functor is to Lens as Applicative is to Biplate: Introducing Multiplate, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Functor is to Lens as Applicative is to Biplate: Introducing Multiplate will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFWR-SCP-O-138481

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.