CIFASIS   20631
CENTRO INTERNACIONAL FRANCO ARGENTINO DE CIENCIAS DE LA INFORMACION Y DE SISTEMAS
Unidad Ejecutora - UE
artículos
Título:
A Represention Theorem for Second-Order Functionals
Autor/es:
MAURO JASKELIOFF; RUSSELL O'CONNOR
Revista:
JOURNAL OF FUNCTIONAL PROGRAMMING
Editorial:
CAMBRIDGE UNIV PRESS
Referencias:
Lugar: Cambridge; Año: 2015 vol. 25
ISSN:
0956-7968
Resumen:
 Representation theorems relate seemingly complex objects to concrete, more tractable ones. In this paper, we take advantage of the abstraction power of category theory and provide a datatype-generic representation theorem. More precisely, we prove a representation theorem for a wide class of second-order functionals which are polymorphic over a class of functors. Types polymorphic over a class of functors are easily representable in languages such as Haskell, but are difficult to analyse and reason about. The concrete representation provided by the theorem is easier to analyse, but it might not be as convenient to implement. Therefore, depending on the task at hand, the change of representation may prove valuable in one direction or the other.  We showcase the usefulness of the representation theorem with a range of examples. Concretely, we show how the representation theorem can be used to prove that traversable functors are finitary containers, how coalgebras of a parameterised store comonad relate to very well-behavedlenses, and how algebraic effects might be implemented in a functional language.