2021-06-04 13:56:03 +00:00
|
|
|
;;; SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
;;; SPDX-FileCopyrightText: Copyright © 2010-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
2021-06-01 15:19:24 +00:00
|
|
|
|
2020-04-27 18:27:48 +00:00
|
|
|
#lang racket/base
|
|
|
|
;; "Instance" protocol for discriminating among
|
|
|
|
;; otherwise-indistinguishable entities.
|
|
|
|
|
|
|
|
(provide (struct-out instance))
|
|
|
|
|
|
|
|
;; (instance Any Any), assertion or message
|
|
|
|
;;
|
|
|
|
;; In cases where `spec` can have multiple instantiations, serves to
|
|
|
|
;; distinguish between them. Each `id` should be unique within its
|
|
|
|
;; scope.
|
|
|
|
;;
|
|
|
|
(struct instance (id spec) #:prefab)
|