Monads for behaviour
The monads used to model effectful computations traditionally concentrate on the \"destination\" - the final results of the program. However, sometimes we are also interested in the \"journey\" - the intermediate course of a computation - especially when reasoning about non-termi...
Main Authors: | , |
---|---|
Format: | Conference item |
Published: |
2013
|
_version_ | 1797091778566815744 |
---|---|
author | Piróg, M Gibbons, J |
author_facet | Piróg, M Gibbons, J |
author_sort | Piróg, M |
collection | OXFORD |
description | The monads used to model effectful computations traditionally concentrate on the \"destination\" - the final results of the program. However, sometimes we are also interested in the \"journey\" - the intermediate course of a computation - especially when reasoning about non-terminating interactive systems. In this article we claim that a necessary property of a monad for it to be able to describe the behaviour of a program is complete iterativity. We show how an ordinary monad can be modified to disclose more about its internal computational behaviour, by applying an associated transformer to a completely iterative monad. To illustrate this, we introduce two new constructions: a coinductive cousin of Cenciarelli and Moggi's generalised resumption transformer, and States - a State-like monad that accumulates the intermediate states. |
first_indexed | 2024-03-07T03:37:23Z |
format | Conference item |
id | oxford-uuid:bcbfa3a5-b299-40f5-991e-5e454dad508d |
institution | University of Oxford |
last_indexed | 2024-03-07T03:37:23Z |
publishDate | 2013 |
record_format | dspace |
spelling | oxford-uuid:bcbfa3a5-b299-40f5-991e-5e454dad508d2022-03-27T05:26:39ZMonads for behaviourConference itemhttp://purl.org/coar/resource_type/c_5794uuid:bcbfa3a5-b299-40f5-991e-5e454dad508dDepartment of Computer Science2013Piróg, MGibbons, JThe monads used to model effectful computations traditionally concentrate on the \"destination\" - the final results of the program. However, sometimes we are also interested in the \"journey\" - the intermediate course of a computation - especially when reasoning about non-terminating interactive systems. In this article we claim that a necessary property of a monad for it to be able to describe the behaviour of a program is complete iterativity. We show how an ordinary monad can be modified to disclose more about its internal computational behaviour, by applying an associated transformer to a completely iterative monad. To illustrate this, we introduce two new constructions: a coinductive cousin of Cenciarelli and Moggi's generalised resumption transformer, and States - a State-like monad that accumulates the intermediate states. |
spellingShingle | Piróg, M Gibbons, J Monads for behaviour |
title | Monads for behaviour |
title_full | Monads for behaviour |
title_fullStr | Monads for behaviour |
title_full_unstemmed | Monads for behaviour |
title_short | Monads for behaviour |
title_sort | monads for behaviour |
work_keys_str_mv | AT pirogm monadsforbehaviour AT gibbonsj monadsforbehaviour |