Handlers in Action

被引:0
|
作者
Kammar, Ohad [1 ]
Lindley, Sam [2 ]
Oury, Nicolas
机构
[1] Univ Cambridge, Cambridge CB2 1TN, England
[2] Univ Strathclyde, Glasgow G1 1XQ, Lanark, Scotland
基金
英国工程与自然科学研究理事会;
关键词
algebraic effects; effect handlers; effect typing; monads; continuations; Haskell; modularity;
D O I
10.1145/2544174.2500590
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Plotkin and Pretnar's handlers for algebraic effects occupy a sweet spot in the design space of abstractions for effectful computation. By separating effect signatures from their implementation, algebraic effects provide a high degree of modularity, allowing programmers to express effectful programs independently of the concrete interpretation of their effects. A handler is an interpretation of the effects of an algebraic computation. The handler abstraction adapts well to multiple settings: pure or impure, strict or lazy, static types or dynamic types. This is a position paper whose main aim is to popularise the handler abstraction. We give a gentle introduction to its use, a collection of illustrative examples, and a straightforward operational semantics. We describe our Haskell implementation of handlers in detail, outline the ideas behind our OCaml, SML, and Racket implementations, and present experimental results comparing handlers with existing code.
引用
收藏
页码:145 / 158
页数:14
相关论文
共 50 条
  • [41] Food handlers' safety course
    Oka, C
    LIBRARY JOURNAL, 2004, 129 (06) : 130 - 130
  • [42] Interrupt handlers in Java']Java
    Korsholm, Stephan
    Schoeberl, Martin
    Ravn, Anders P.
    ISORC 2008: 11TH IEEE SYMPOSIUM ON OBJECT/COMPONENT/SERVICE-ORIENTED REAL-TIME DISTRIBUTED COMPUTING - PROCEEDINGS, 2008, : 453 - +
  • [43] Algebraic effects and handlers for arrows
    Sanada, Takahiro
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2024, 34
  • [44] Esd hazards in ic handlers
    Peirce, Roger J.
    Williford, Bradley R.
    EE: Evaluation Engineering, 2009, 48 (12): : 37 - 39
  • [45] A Separation Logic for Effect Handlers
    de Vilhena, Paulo Emilio
    Pottier, Francois
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2021, 5 (POPL):
  • [46] A NEW ERA IN TEST HANDLERS
    COLVERT, D
    PROCEEDING OF THE TECHNICAL PROGRAM OF NEPCON WEST 89, VOLS 1 AND 2, 1989, : 1251 - 1258
  • [47] Physical examination of food handlers
    Gloyne, LB
    JOURNAL OF THE AMERICAN MEDICAL ASSOCIATION, 1922, 78 : 1455 - 1456
  • [48] WARTS AMONG MEAT HANDLERS
    DUROCHER, LP
    PAQUETTE, N
    UNION MEDICALE DU CANADA, 1986, 115 (09): : 642 - +
  • [49] CRYPTOSPORIDIOSIS IN CALVES AND THEIR HANDLERS IN BANGLADESH
    RAHAMAN, ASMH
    SANYAL, SC
    ALMAHMUD, KA
    SOBHAN, A
    HOSSAIN, KS
    ANDERSON, BC
    LANCET, 1984, 2 (8396): : 221 - 221
  • [50] LEPROSY IN 5 ARMADILLO HANDLERS
    LUMPKIN, LR
    COX, GF
    WOLF, JE
    JOURNAL OF THE AMERICAN ACADEMY OF DERMATOLOGY, 1983, 9 (06) : 899 - 903