English
Related papers

Related papers: Retrofitting Effect Handlers onto OCaml

200 papers

Effect handlers are a powerful abstraction for defining, customising, and composing computational effects. Statically ensuring that all effect operations are handled requires some form of effect system, but using a traditional effect system…

Programming Languages · Computer Science 2025-03-20 Wenhao Tang , Leo White , Stephen Dolan , Daniel Hillerström , Sam Lindley , Anton Lorenzen

Algebraic effect handlers is a programming paradigm where programmers can declare their own syntactic operations, and modularly define the semantics of these using effect handlers. However, we cannot directly define algebraic effect…

Programming Languages · Computer Science 2022-03-08 Cas van der Rest , Jaro Reinders , Casper Bach Poulsen

Recent work has provided delimited control for Prolog to dynamically manipulate the program control-flow, and to implement a wide range of control-flow and dataflow effects on top of. Unfortunately, delimited control is a rather primitive…

Programming Languages · Computer Science 2016-08-03 Amr Hany Saleh , Tom Schrijvers

Implementing LLM-integrated scripts introduces challenges in modularity and performance, as scripts are often coupled to specific LLM implementations and fail to exploit parallelization opportunities. This paper proposes using composable…

Programming Languages · Computer Science 2025-07-30 Di Wang

Pressed by the difficulty of writing asynchronous, event-driven code, mainstream languages have recently been building in support for a variety of advanced control-flow features. Meanwhile, experimental language designs have suggested…

Programming Languages · Computer Science 2020-10-20 Yizhou Zhang , Guido Salvaneschi , Andrew C. Myers

Effect handlers are increasingly prominent in modern programming for managing complex computational effects, including concurrency, asynchronous operations, and exception handling, in a modular and flexible manner. Efficient stack…

Programming Languages · Computer Science 2025-12-19 ZeHao Yu

Effect handlers allow programmers to model and compose computational effects modularly. Effect systems statically guarantee that all effects are handled. Several recent practical effect systems are based on either row polymorphism or…

Programming Languages · Computer Science 2025-12-16 Wenhao Tang , Sam Lindley

OCaml is an industrial-strength, multi-paradigm programming language, widely used in industry and academia. OCaml is also one of the few modern managed system programming languages to lack support for shared memory parallel programming.…

Programming Languages · Computer Science 2020-07-03 KC Sivaramakrishnan , Stephen Dolan , Leo White , Sadiq Jaffer , Tom Kelly , Anmol Sahoo , Sudha Parimala , Atul Dhiman , Anil Madhavapeddy

Algebraic effects and handlers are a mechanism to structure programs with computational effects in a modular way. They are recently gaining popularity and being adopted in practical languages, such as OCaml. Meanwhile, there has been…

Programming Languages · Computer Science 2023-11-20 Fuga Kawamata , Hiroshi Unno , Taro Sekiyama , Tachio Terauchi

The development of programming languages can be quite complicated and costly. Hence, much effort has been devoted to the modular definition of language features that can be reused in various combinations to define new languages and…

Programming Languages · Computer Science 2021-08-26 Birthe van den Berg , Tom Schrijvers , Casper Bach-Poulsen , Nicolas Wu

Large-Language Models (LLMs) are changing the way learners acquire knowledge outside the classroom setting. Previous studies have shown that LLMs seem effective in generating to short and simple questions in introductory CS courses using…

Programming Languages · Computer Science 2026-03-09 Yihan Zhang , Brigitte Pientka , Xujie Si

We present a complete polymorphic effect inference algorithm for an ML-style language with handlers of not only exceptions, but of any other algebraic effect such as input & output, mutable references and many others. Our main aim is to…

Programming Languages · Computer Science 2015-07-01 Matija Pretnar

Algebraic effects and handlers have emerged in the programming languages community as a convenient, modular abstraction for controlling computational effects. They have found several applications including concurrent programming, meta…

Programming Languages · Computer Science 2018-11-16 Dave Moore , Maria I. Gorinova

Inference algorithms for probabilistic programming are complex imperative programs with many moving parts. Efficient inference often requires customising an algorithm to a particular probabilistic model or problem, sometimes called…

Programming Languages · Computer Science 2024-12-24 Minh Nguyen , Roly Perera , Meng Wang , Steven Ramsay

We explore asynchronous programming with algebraic effects. We complement their conventional synchronous treatment by showing how to naturally also accommodate asynchrony within them, namely, by decoupling the execution of operation calls…

Programming Languages · Computer Science 2024-09-25 Danel Ahman , Matija Pretnar

We introduce a new programming language and its categorical semantics in order to design and implement neural networks within the framework of algebraic effects and handlers for arrows. Our language enables us to construct neural networks…

Programming Languages · Computer Science 2026-02-23 Takahiro Sanada , Keisuke Hoshino , Kenshin Hirai , Shin-ya Katsumata

Algebraic effects & handlers are a modular approach for modeling side-effects in functional programming. Their syntax is defined in terms of a signature of effectful operations, encoded as a functor, that are plugged into the free monad;…

Programming Languages · Computer Science 2023-02-06 Birthe van den Berg , Tom Schrijvers

OCaml function calls consume space on the system stack. Operating systems set default limits on the stack space which are much lower than the available memory. If a program runs out of stack space, they get the dreaded "Stack Overflow"…

Programming Languages · Computer Science 2021-02-22 Frédéric Bour , Basile Clément , Gabriel Scherer

Common functional languages incentivize tail-recursive functions, as opposed to general recursive functions that consume stack space and may not scale to large inputs. This distinction occasionally requires writing functions in a…

Programming Languages · Computer Science 2024-12-02 Clément Allain , Frédéric Bour , Basile Clément , François Pottier , Gabriel Scherer

Eff is a programming language based on the algebraic approach to computational effects, in which effects are viewed as algebraic operations and effect handlers as homomorphisms from free algebras. Eff supports first-class effects and…

Programming Languages · Computer Science 2015-07-17 Andrej Bauer , Matija Pretnar
‹ Prev 1 2 3 10 Next ›