🤖 AI Summary
This paper addresses the language design challenge of higher-order effectful operations—i.e., operations that take computations as arguments or return them as results—by proposing a handler mechanism based on *lawless raw monads*, ensuring *decidable satisfaction of monadic laws at the level of computation judgments* without sacrificing expressivity. Methodologically, it introduces: (1) *judgmental monadic laws*, embedding equational constraints directly into the type system; (2) a novel *$op$-lifting* technique supporting higher-order polymorphism and optional general recursion; and (3) a formalization of the core calculus within a logical framework, combining synthetic Tait computability with denotational semantics. The results include canonical forms and parametricity proofs for closed terms in the recursion-free fragment. This work establishes the first theoretical foundation for higher-order effect handlers that simultaneously guarantees flexibility, semantic rigor, and formal verifiability.
📝 Abstract
This paper studies the design of programming languages with handlers of higher-order effectful operations -- effectful operations that may take in computations as arguments or return computations as output. We present and analyse a core calculus with higher-kinded impredicative polymorphism, handlers of higher-order effectful operations, and optionally general recursion. The distinctive design choice of this calculus is that handlers are carried by lawless raw monads, while the computation judgements still satisfy the monadic laws judgementally. We present the calculus with a logical framework and give denotational models of the calculus using realizability semantics. We prove closed-term canonicity and parametricity for the recursion-free fragment of the language using synthetic Tait computability and a novel form of the $ op op$-lifting technique.