On this page:
assert-unreachable
10.8.1 Customized Unreachable Reporting
with-assert-unreachable

10.8 Unreachable Expressions🔗ℹ

procedure

(assert-unreachable)  none/c

Reports an assertion failure by raising exn:fail:contract, which is useful as a safe counterpart to unsafe-assert-unreachable.

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.

syntax

(with-assert-unreachable
  body ...+)
Similar to (assert-unreachable), asserts that the body 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 the body 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).