Signature restriction for polymorphic algebraic effects

03/18/2020
by   Taro Sekiyama, et al.
0

It has been well known that naively combining polymorphic effects and polymorphic type assignment breaks type safety. Existing approaches to this problem are classified into two groups: one for restricting how effects are triggered and the other for restricting how they are implemented. This work explores a new approach to the safety of polymorphic effects in polymorphic type assignment. A novelty of our work lies in finding a restriction on effect interfaces. To formalize our idea, we employ algebraic effects and handlers, where an effect interface is given by a set of operations coupled with type signatures. We propose signature restriction, a new notion to restrict the type signatures of operations, and show that signature restriction is sufficient to ensure type safety of an effectful language equipped with unrestricted polymorphic type assignment. We also develop a type-and-effect system to enable the use of both operations that follow and do not follow signature restriction in a single program.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/18/2018

Handling polymorphic algebraic effects

Algebraic effects and handlers are a powerful abstraction mechanism to r...
research
07/18/2023

Complete representation by partial functions for signatures containing antidomain restriction

We investigate notions of complete representation by partial functions, ...
research
05/27/2020

Local Algebraic Effect Theories

Algebraic effects are computational effects that can be described with a...
research
03/03/2019

Modular specification of monads through higher-order presentations

In their work on second-order equational logic, Fiore and Hur have studi...
research
03/29/2022

On Reinforcement Learning, Effect Handlers, and the State Monad

We study the algebraic effects and handlers as a way to support decision...
research
02/13/2020

Learning to Represent Programs with Property Signatures

We introduce the notion of property signatures, a representation for pro...
research
11/14/2019

Reduction Monads and Their Signatures

In this work, we study 'reduction monads', which are essentially the sam...

Please sign up or login with your details

Forgot password? Click here to reset