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 条
  • [31] Predictors of Bothrops jararaca venom allergy in snake handlers and snake venom handlers
    de Medeiros, Carlos R.
    Barbaro, Katia C.
    Lira, Marcela S.
    Franca, Francisco O. S.
    Zaher, Vera L.
    Kokron, Cristina M.
    Kalil, Jorge
    Castro, Fabio F. M.
    TOXICON, 2008, 51 (04) : 672 - 680
  • [32] First Class Dynamic Effect Handlers or, Polymorphic Heaps with Dynamic Effect Handlers
    Leijen, Daan
    PROCEEDINGS OF THE 3RD ACM SIGPLAN INTERNATIONAL WORKSHOP ON TYPE-DRIVEN DEVELOPMENT (TYDE '18), 2018, : 51 - 64
  • [33] Food handlers examinations
    Thompson, HA
    JOURNAL OF THE AMERICAN MEDICAL ASSOCIATION, 1933, 101 : 1018 - 1018
  • [34] Control of food handlers
    不详
    BRITISH MEDICAL JOURNAL, 1937, 1937 : 870 - 871
  • [35] Blastocystis in animal handlers
    H. Rajah Salim
    G. Suresh Kumar
    S. Vellayan
    J. W. Mak
    A. Khairul Anuar
    I. Init
    G. D. Vennila
    R. Saminathan
    K. Ramakrishnan
    Parasitology Research, 1999, 85 : 1032 - 1033
  • [36] WARTS IN FISH HANDLERS
    RUDLINGER, R
    BUNNEY, MH
    GROB, R
    HUNTER, JAA
    BRITISH JOURNAL OF DERMATOLOGY, 1989, 120 (03) : 375 - 381
  • [37] Document handlers merge
    不详
    PROFESSIONAL ENGINEERING, 1998, 11 (15) : 7 - 7
  • [38] Handlers tune in to radios
    Jane's Airport Review, 2004, (OCT.):
  • [39] USAF DOG HANDLERS RECEIVE UNIQUE TRAINING IN ENGLAND - TRAINING AS A CHALLENGE TO USAF HANDLERS
    ANDERSON, JC
    POLICE CHIEF, 1981, 48 (05): : 36 - 37
  • [40] Gradual Typing for Effect Handlers
    New, Max S.
    Giovannini, Eric
    Licata, Daniel R.
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (OOPSLA):