Correct Looping Arrows from Cyclic Terms

Traced Categorical Interpretation in Haskell
  • Makoto Hamana
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7294)


Arrows involving a loop operator provide an interesting programming methodology for looping computation. On the other hand, Haskell can define cyclic data structures by recursive definitions. This paper shows that there exists a common principle underlying both cyclic data and cyclic computations of arrow programs. We examine three concrete examples of constructing looping arrows from a syntactic structure called cyclic terms. Then we present a general pattern of constructing correct looping arrows, that is based on categorical semantics of loops and arrows, i.e. traced and Freyd categories.


Monoidal Category Symmetric Monoidal Category Cyclic Data Pure Function Cyclic Term 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Benton, N., Hyland, M.: Traced premonoidal categories. Theoretical Informatics and Applications 37(4), 273–299 (2003)MathSciNetzbMATHCrossRefGoogle Scholar
  2. 2.
    Crole, R.L.: Categories for Types. Cambridge Mathematical Textbook (1993)Google Scholar
  3. 3.
    Ghani, N., Hamana, M., Uustalu, T., Vene, V.: Representing cyclic structures as nested datatypes. In: Proceedings of Trends in Functional Programming, pp. 173–188 (2006)Google Scholar
  4. 4.
    Hasegawa, M.: Models of Sharing Graphs: A Categorical Semantics of let and letrec. PhD thesis, University of Edinburgh (1997)Google Scholar
  5. 5.
    Heunen, C., Jacobs, B.: Arrows, like monads, are monoids. In: Proc. of MFPS 22. ENTCS, vol. 158, pp. 219–236 (2006)Google Scholar
  6. 6.
    Hughes, J.: Generalising monads to arrows. Sci. Comput. Program. 37(1-3), 67–111 (2000)zbMATHCrossRefGoogle Scholar
  7. 7.
    Joyal, A., Street, R., Verity, D.: Traced monoidal categories. Mathematical Proceedings of the Cambridge Philosophical Society 119(3), 447–468 (1996)MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    Lindley, S., Wadler, P., Yallop, J.: The arrow calculus. Journal of Functional Programming 20(1), 51–69 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  9. 9.
    Paterson, R.: A new notation for arrows. In: Proc. of ICFP 2001, pp. 229–240 (2001)Google Scholar
  10. 10.
    Paterson, R.: Arrows and computation. In: The Fun of Programming, Cornerstones of Computing, pp. 201–222. Palgrave Macmillan (2003)Google Scholar
  11. 11.
    Power, J., Robinson, E.: Premonoidal categories and notions of computation. Mathematical Structures in Computer Science 7(5), 453–468 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  12. 12.
    Power, J., Thielecke, H.: Closed Freyd- and κ-categories. In: Wiedermann, J., Van Emde Boas, P., Nielsen, M. (eds.) ICALP 1999. LNCS, vol. 1644, pp. 625–634. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  13. 13.
    Simpson, A.K., Plotkin, G.D.: Complete axioms for categorical fixed-point operators. In: Proc. of LICS 2000, pp. 30–41 (2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Makoto Hamana
    • 1
  1. 1.Department of Computer ScienceGunma UniversityJapan

Personalised recommendations