Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (13 sloc) 0.573 kB
#lang racket/base
(provide lookup-language-namespace)
(define language-namespace-cache (make-hash))
;; lookup-language-namespace: module-path -> namespace
;; Returns a namespace associated with the lang.
(define (lookup-language-namespace lang)
(hash-ref language-namespace-cache lang
(lambda ()
(let ([ns (make-base-empty-namespace)])
(parameterize ([current-namespace ns])
(namespace-require lang))
(hash-set! language-namespace-cache lang ns)
ns))))
Jump to Line
Something went wrong with that request. Please try again.