University of Cambridge > Talks.cam > Computer Laboratory Programming Research Group Seminar > Evaluation strategies for monadic computations

Evaluation strategies for monadic computations

Add to your list(s) Download to your calendar using vCal

If you have a question about this talk, please contact Dominic Orchard.

Monads have become a powerful tool for structuring effectful computations in functional programming, because they make the order of effects explicit. When translating pure code to a monadic version, we need to specify evaluation order explicitly. This requires us to choose between call-by-value or call-by-name style. The two translations give programs with different semantics, structure and also different types.

In this talk, we translate pure code to monadic using an additional operation malias that abstracts out the evaluation strategy. The malias operation is based on computational comonads; we use a categorical framework to specify the laws that are required to hold about the operation.

We show two implementations of malias for any monad that give call-by-value and call-by-name semantics. Although we do not give call-by-need semantics for any monad, we show how to turn any monad into an extended monad with call-by-need semantics, which partly answers a standing open question. Moreover, using our unified translation, it is possible to change the evaluation strategy of functional code translated to the monadic form without changing its structure or types.

This talk is part of the Computer Laboratory Programming Research Group Seminar series.

Tell a friend about this talk:

This talk is included in these lists:

Note that ex-directory lists are not shown.

 

© 2006-2019 Talks.cam, University of Cambridge. Contact Us | Help and Documentation | Privacy and Publicity