Associated Effects Flexible Abstractions for Effectful Programming

被引:0
|
作者
Lutze, Matthew [1 ]
Madsen, Magnus [1 ]
机构
[1] Aarhus Univ, Aarhus, Denmark
关键词
effect systems; associated effects; associated types; generic programming; type classes; type functions; ad-hoc polymorphism;
D O I
10.1145/3656393
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present associated effects, a programming language feature that enables type classes to abstract over the effects of their function signatures, allowing each type class instance to specify its concrete effects. Associated effects significantly increase the flexibility and expressive power of a programming language that combines a type and effect system with type classes. In particular, associated effects allow us to (i) abstract over total and partial functions, where partial functions may throw exceptions, (ii) abstract over immutable data structures and mutable data structures that have heap effects, and (iii) implement adaptors that combine type classes with algebraic effects. We implement associated effects as an extension of the Flix programming language and refactor the Flix Standard Library to use associated effects, significantly increasing its flexibility and expressive power. Specifically, we add associated effects to 11 type classes, which enables us to add 28 new type class instances.
引用
收藏
页数:23
相关论文
共 50 条
  • [1] Efficient Abstractions for GPGPU Programming
    Mathias Bourgoin
    Emmanuel Chailloux
    Jean-Luc Lamotte
    International Journal of Parallel Programming, 2014, 42 : 583 - 600
  • [2] Efficient Abstractions for GPGPU Programming
    Bourgoin, Mathias
    Chailloux, Emmanuel
    Lamotte, Jean-Luc
    INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 2014, 42 (04) : 583 - 600
  • [3] Programming with shared data abstractions
    Dobson, S
    Goodeve, D
    SOLVING IRREGULARLY STRUCTURED PROBLEMS IN PARALLEL, 1997, 1253 : 93 - 102
  • [4] ABSTRACTIONS FOR DISTRIBUTED-PROGRAMMING
    COOK, RP
    COMPUTER LANGUAGES, 1981, 6 (3-4): : 131 - 138
  • [5] Linguistic support for distributed programming abstractions
    Damm, CH
    Eugster, PT
    Guerraoui, R
    24TH INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS, PROCEEDINGS, 2004, : 244 - 251
  • [6] Abstractions for portable, scalable parallel programming
    Alverson, GA
    Griswold, WG
    Lin, C
    Notkin, D
    Snyder, L
    IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 1998, 9 (01) : 71 - 86
  • [7] Scalable programming abstractions for XML services
    Emir, Burak
    Maneth, Sebastian
    Odersky, Martin
    DEPENDABLE SYSTEMS: SOFTWARE, COMPUTING, NETWORKS, 2006, 4028 : 103 - 126
  • [8] ABSTRACTIONS FOR CONTINUOUS-MEDIA PROGRAMMING
    STEINMETZ, R
    FRITZSCHE, JC
    COMPUTER COMMUNICATIONS, 1992, 15 (06) : 396 - 402
  • [9] Abstractions for portable, scalable parallel programming
    Tera Computer Co, Seattle, United States
    IEEE Trans Parallel Distrib Syst, 1 (71-86):
  • [10] GARP - GRAPH ABSTRACTIONS FOR CONCURRENT PROGRAMMING
    KAPLAN, SM
    KAISER, GE
    LECTURE NOTES IN COMPUTER SCIENCE, 1988, 300 : 191 - 205