From 67bd2d111176e3fc6e8c104530e2b83c70b14743 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 30 Mar 2015 10:30:00 -0700 Subject: [PATCH] add note about ability to use other #langs as Pollen source files --- scribblings/formats.scrbl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scribblings/formats.scrbl b/scribblings/formats.scrbl index 244f559..78e9178 100644 --- a/scribblings/formats.scrbl +++ b/scribblings/formats.scrbl @@ -38,12 +38,14 @@ There are no undefined commands in Pollen. If a command has not already been def @subsection{Standard exports} -By default, every Pollen source file exports two symbols, which you can access by using the source file with @racket[require]: +By default, every Pollen source file exports two identifiers, which you can access by using the source file with @racket[require]: @racket['doc] contains the output of the file. The type of output depends on the source format (documented below). @racket['metas] is a hash of key–value pairs with extra information that is extracted from the source. These @racket['metas] will always contain the key @racket['here-path], which returns a string representation of the full path to the source file. Beyond that, the only @racket['metas] are the ones that are specified within the source file (see the source formats below for more detail on how to specify metas). +@margin-note{The Pollen rendering system relies on these two identifiers, but otherwise doesn't care how they're generated. Meaning, the code inside your Pollen source file could be @litchar{#lang racket} or @litchar{#lang whatever}. As long as you manually @racket[provide] those two identifiers and follow the usual file-naming convention, your source file will be usable.} + @bold{How is this different from Racket?} In Racket, you must explicitly @racket[define] and then @racket[provide] any values you want to export. @subsection{Custom exports}