There and back again: arrows for invertible programming

  • Authors:
  • Artem Alimarine;Sjaak Smetsers;Arjen van Weelden;Marko van Eekelen;Rinus Plasmeijer

  • Affiliations:
  • Radboud University Nijmegen, Nijmegen, The Netherlands;Radboud University Nijmegen, Nijmegen, The Netherlands;Radboud University Nijmegen, Nijmegen, The Netherlands;Radboud University Nijmegen, Nijmegen, The Netherlands;Radboud University Nijmegen, Nijmegen, The Netherlands

  • Venue:
  • Proceedings of the 2005 ACM SIGPLAN workshop on Haskell
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Invertible programming occurs in the area of data conversion where it is required that the conversion in one direction is the inverse of the other. For that purpose, we introduce bidirectional arrows (bi-arrows). The bi-arrow class is an extension of Haskell's arrow class with an extra combinator that changes the direction of computation.The advantage of the use of bi-arrows for invertible programming is the preservation of invertibility properties using the bi-arrow combinators. Programming with bi-arrows in a polytypic or generic way exploits this the most. Besides bidirectional polytypic examples, including invertible serialization, we give the definition of a monadic bi-arrow transformer, which we use to construct a bidirectional parser/pretty printer.