Skip to main content

Correct Looping Arrows from Cyclic Terms

Traced Categorical Interpretation in Haskell

  • Conference paper
  • 564 Accesses

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 7294)

Abstract

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.

Keywords

  • 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.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Benton, N., Hyland, M.: Traced premonoidal categories. Theoretical Informatics and Applications 37(4), 273–299 (2003)

    CrossRef  MathSciNet  MATH  Google Scholar 

  2. Crole, R.L.: Categories for Types. Cambridge Mathematical Textbook (1993)

    Google Scholar 

  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. Hasegawa, M.: Models of Sharing Graphs: A Categorical Semantics of let and letrec. PhD thesis, University of Edinburgh (1997)

    Google Scholar 

  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. Hughes, J.: Generalising monads to arrows. Sci. Comput. Program. 37(1-3), 67–111 (2000)

    CrossRef  MATH  Google Scholar 

  7. Joyal, A., Street, R., Verity, D.: Traced monoidal categories. Mathematical Proceedings of the Cambridge Philosophical Society 119(3), 447–468 (1996)

    CrossRef  MathSciNet  MATH  Google Scholar 

  8. Lindley, S., Wadler, P., Yallop, J.: The arrow calculus. Journal of Functional Programming 20(1), 51–69 (2010)

    CrossRef  MathSciNet  MATH  Google Scholar 

  9. Paterson, R.: A new notation for arrows. In: Proc. of ICFP 2001, pp. 229–240 (2001)

    Google Scholar 

  10. Paterson, R.: Arrows and computation. In: The Fun of Programming, Cornerstones of Computing, pp. 201–222. Palgrave Macmillan (2003)

    Google Scholar 

  11. Power, J., Robinson, E.: Premonoidal categories and notions of computation. Mathematical Structures in Computer Science 7(5), 453–468 (1997)

    CrossRef  MathSciNet  MATH  Google Scholar 

  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)

    CrossRef  Google Scholar 

  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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hamana, M. (2012). Correct Looping Arrows from Cyclic Terms. In: Schrijvers, T., Thiemann, P. (eds) Functional and Logic Programming. FLOPS 2012. Lecture Notes in Computer Science, vol 7294. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-29822-6_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-29822-6_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-29821-9

  • Online ISBN: 978-3-642-29822-6

  • eBook Packages: Computer ScienceComputer Science (R0)