kirancodes.me
To Proof Maintenance & Beyond!

On the bright side of type classes: instance arguments in Agda

Dominique Devriese, Frank Piessens

Abstract

We present instance arguments: an alternative to type classes and related features in the dependently typed, purely functional programming language/proof assistant Agda. They are a new, general type of function arguments, resolved from call-site scope in a type-directed way. The mechanism is inspired by both Scala's implicits and Agda's existing implicit arguments, but differs from both in important ways. Our mechanism is designed and implemented for Agda, but our design choices can be applied to other programming languages as well.

DOI 10.1145/2034773.2034796

Related papers