From 5e9eedd41c8bd39a0246151b7964f30d0b4827f8 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Fri, 17 Oct 2014 15:23:28 -0400 Subject: [PATCH] Support `define-namespace-anchor` in TR original commit: 03855eb53248f6de46ccfaa71b001a0375156e50 --- .../typed-racket/base-env/base-special-env.rkt | 2 ++ .../tests/typed-racket/succeed/namespace-anchor.rkt | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/namespace-anchor.rkt diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt index 119a51d2..fbcfffc3 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt @@ -217,4 +217,6 @@ (-> -FlVector (-seq -Flonum))] [(make-template-identifier 'in-extflvector* 'racket/extflonum) (-> -ExtFlVector (-seq -ExtFlonum))] + [(make-template-identifier 'make-namespace-anchor 'racket/private/namespace) + (-> -Variable-Reference -Namespace-Anchor)] ) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/namespace-anchor.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/namespace-anchor.rkt new file mode 100644 index 00000000..60e58b97 --- /dev/null +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/namespace-anchor.rkt @@ -0,0 +1,7 @@ +#lang typed/racket/base + +;; Tests namespace anchors. Not a unit test because `define-namespace-anchor` +;; only works at the top-level or in a module. + +(: x Namespace-Anchor) +(define-namespace-anchor x)