move metas inside core #lang module

pull/102/head
Matthew Butterick 9 years ago
parent a3b2b8b069
commit 0dfe536350

@ -45,10 +45,11 @@
(module inner pollen/doclang-raw
DOC-RAW ; positional arg for doclang-raw that sets name of export.
(require pollen/top pollen/world)
(provide #%top (all-defined-out) (all-from-out pollen/world))
(require (submod ".." META-MOD))
(provide (all-defined-out) #%top (all-from-out pollen/world (submod ".." META-MOD)))
EXPR-WITHOUT-METAS (... ...))
(require 'inner 'META-MOD)
(require 'inner)
(define DOC
(let* ([parser-mode-undefined? (procedure? inner:parser-mode)] ; if undefined, #%top makes it a procedure
[parser-mode (if parser-mode-undefined? PARSER-MODE-ARG inner:parser-mode)]

@ -0,0 +1,10 @@
#lang racket
;; check that a `define-meta` is immediately available
(module metatest pollen
(define-meta key "value")
(define val (hash-ref metas 'key))
(provide val))
(require rackunit 'metatest)
(check-equal? val "value")
Loading…
Cancel
Save