Gradual Typing for Effect Handlers

04/04/2023
by   Max S. New, et al.
0

We present a gradually typed language, GrEff, with effects and handlers that supports migration from unchecked to checked effect typing. This serves as a simple model of the integration of an effect typing discipline with an existing effectful typed language that does not track fine-grained effect information. Our language supports a simple module system to model the programming model of gradual migration from unchecked to checked effect typing in the style of Typed Racket. The surface language GrEff is given semantics by elaboration to a core language Core GrEff. We equip Core GrEff with an inequational theory for reasoning about the semantic error ordering and desired program equivalences for programming with effects and handlers. We derive an operational semantics for the language from the equations provable in the theory. We then show that the theory is sound by constructing an operational logical relations model to prove the graduality theorem. This extends prior work on embedding-projection pair models of gradual typing to handle effect typing and subtyping.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/18/2020

Handling Bidirectional Control Flow: Technical Report

Pressed by the difficulty of writing asynchronous, event-driven code, ma...
research
07/10/2019

CallE: An Effect System for Method Calls

Effect systems are used to statically reason about the effects an expres...
research
03/04/2021

Contextual Modal Types for Algebraic Effects and Handlers

Programming languages with algebraic effects often rely on effect annota...
research
05/14/2014

Contextual Abductive Reasoning with Side-Effects

The belief bias effect is a phenomenon which occurs when we think that w...
research
12/31/2018

Eff Directly in OCaml

The language Eff is an OCaml-like language serving as a prototype implem...
research
07/20/2017

A monadic solution to the Cartwright-Felleisen-Wadler conjecture

Given a programming language, can we give a monadic denotational semanti...
research
01/28/2020

Unifying graded and parameterised monads

Monads are a useful tool for structuring effectful features of computati...

Please sign up or login with your details

Forgot password? Click here to reset