Correct Looping Arrows from Cyclic Terms - Traced Categorical Interpretation in Haskell

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.

[1]  Hayo Thielecke,et al.  Closed Freyd-and -categories , 1999 .

[2]  Roy L. Crole,et al.  Categories for Types , 1994, Cambridge mathematical textbooks.

[3]  Nick Benton,et al.  Traced Premonoidal Categories , 2003, RAIRO Theor. Informatics Appl..

[4]  John Hughes,et al.  Generalising monads to arrows , 2000, Sci. Comput. Program..

[5]  Gordon D. Plotkin,et al.  Complete axioms for categorical fixed-point operators , 2000, Proceedings Fifteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.99CB36332).

[6]  真人 長谷川 Models of sharing graphs : a categorical semantics of let and letrec , 1999 .

[7]  Chris Heunen,et al.  Arrows, like Monads, are Monoids , 2006, MFPS.

[8]  Edmund Robinson,et al.  Premonoidal categories and notions of computation , 1997, Mathematical Structures in Computer Science.

[9]  Ross Paterson,et al.  Arrows and computation , 2009 .

[10]  Neil Ghani,et al.  Representing Cyclic Structures as Nested Datatypes , 2006 .

[11]  Hayo Thielecke,et al.  Closed Freyd- and kappa-categories , 1999, ICALP.

[12]  Ross Paterson,et al.  A new notation for arrows , 2001, ICFP '01.

[13]  Ross Street,et al.  Traced monoidal categories , 1996 .

[14]  Philip Wadler,et al.  The arrow calculus , 2010, J. Funct. Program..

[15]  Robin Milner,et al.  On Observing Nondeterminism and Concurrency , 1980, ICALP.