10.8 Unreachable Expressions (original) (raw)

10.8 Unreachable Expressions🔗

Added in version 8.0.0.11 of package base.

10.8.1 Customized Unreachable Reporting🔗

The bindings documented in this section are provided by the racket/unreachable library, not racket/base or racket.

Added in version 8.0.0.11 of package base.

(with-assert-unreachable
body ...+)

Similar to (assert-unreachable), asserts that thebody forms should not be reached.

Unless the expression is part of a module that includes(#%declare #:unsafe), then it is equivalent to(let-values () body ...+). The intent is that thebody forms will raise exn:fail:contract.

When a with-assert-unreachable expression is part of a module with (#%declare #:unsafe), then it is equivalent to(unsafe-assert-unreachable).