Combining effects: Sum and tensor

被引:115
作者
Hyland, Martin
Plotkin, Gordon
Power, John
机构
[1] Univ Edinburgh, Sch Informat, Lab Fdn Comp Sci, Edinburgh EH9 3JZ, Midlothian, Scotland
[2] Univ Cambridge, Dept Math, Cambridge CB3 0WB, England
基金
英国工程与自然科学研究理事会;
关键词
computational effect; Lawvere theory; modularity; monad;
D O I
10.1016/j.tcs.2006.03.013
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We seek a unified account of modularity for computational effects. We begin by reformulating Moggi's monadic paradigm for modelling computational effects using the notion of enriched Lawvere theory, together with its relationship with strong monads; this emphasises the importance of the operations that produce the effects. Effects qua theories are then combined by appropriate bifunctors on the category of theories. We give a theory for the sum of computational effects, which in particular yields Moggi's exceptions monad transformer and an interactive input/output monad transformer. We further give a theory of the commutative combination of effects, their tensor, which yields Moggi's side-effects monad transformer. Finally, we give a theory of operation transformers, for redefining operations when adding new effects; we derive explicit forms for the operation transformers associated to the above monad transformers. (C) 2006 Elsevier B.V. All rights reserved.
引用
收藏
页码:70 / 99
页数:30
相关论文
共 58 条
[1]  
ABRAMSKY S, 1983, LECT NOTES COMPUT SC, V158, P1
[2]   A DOMAIN EQUATION FOR BISIMULATION [J].
ABRAMSKY, S .
INFORMATION AND COMPUTATION, 1991, 92 (02) :161-218
[3]  
Adamek J., 1994, LOCALLY PRESENTABLE
[4]  
[Anonymous], 1963, THESIS COLUMBIA U
[5]  
[Anonymous], 1976, GRADUATE TEXTS MATH
[6]  
[Anonymous], ENCY MATH
[7]  
Barr M., 1985, Toposes, Triples and Theories
[8]  
Barr M., 1990, Category theory for computing science
[9]  
Benton N, 2002, LECT NOTES COMPUT SC, V2395, P42
[10]  
Bird Richard, 1998, Introduction to Functional Programming Using Haskell, V2