SRFI 284: define-typed

by Arne Babenhauserheide

status: draft (2026-09-18)

keywords: Type Checking

Abstract

This SRFI defines the forms define-typed and define-typed* for creating procedures with checked type boundaries. It allows checking the arguments and/or the return value or values with simple predicate procedures and raises exceptions on usage when they don’t match. The form define-typed* supports keyword and optional arguments. The implementation for Guile is optimized to allow the compiler to use the predicates as guarantees to create more optimized code and provides type information for runtime introspection that supports SRFI 283.