Skip to content

Instantly share code, notes, and snippets.

@LeifAndersen
Created September 13, 2018 23:22
Show Gist options
  • Save LeifAndersen/ecd749b25bdba5c59441c4dd4fa2091b to your computer and use it in GitHub Desktop.
Save LeifAndersen/ecd749b25bdba5c59441c4dd4fa2091b to your computer and use it in GitHub Desktop.
#lang racket
;; crosser.rkt
#|
(module crosser '#%kernel
(#%declare #:cross-phase-persistent)
(define-values (prop:p p? ~p) (make-struct-type-property 'p))
(#%provide (protect (all-defined))))
|#
(define a
(parameterize ([current-namespace (make-base-namespace)])
(namespace-require "crosser.rkt")
(namespace-variable-value 'prop:p)))
(define b
(parameterize ([current-namespace (make-base-namespace)])
(namespace-require "crosser.rkt")
(namespace-variable-value 'prop:p)))
(writeln (eq? a b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment