Support a setup that reverted #%top to its usual meaning
Per https://groups.google.com/forum/#!searchin/pollenpub/unbound%7Csort:date/pollenpub/gpRk-s1cMNA/Kji1D73aDwAJ, it would be nice if there's an option to opt-out of Pollen's
#%top overriding. This can be done by either providing a setup value or a new (sub)language. A setup value might be more preferable since Pollen has sublanguages like
#lang pollen/ptree, etc. already, and it wouldn't interact well with this orthogonal feature.
If we revert
#%top to its usual meaning, and
root is not defined in
"pollen.rkt", then what should happen? Consistency seems to dictate that
root raise an unbound-identifier error.
I’ve pushed a patch for this. Why don’t you try it out and see if it does what you expect. If so, I’ll add it to the docs.
I’ve introduced a new
setup value called
allow-unbound-ids. If set to
#false, it will raise an error for unbound identifiers (= the typical
#lang racket/base (provide (all-defined-out)) (module setup racket/base (provide allow-unbound-ids) (define allow-unbound-ids #false))
Yup, this is exactly what I expect. Thank you again :)
Re: root, right, that would be an unbound id error. It's a one time thing to do, and you need
pollen.rkt to setup
allow-unbound-ids already anyway, so it's relatively easy to do.
In Pollen 2.0, I changed the name of this setup to
?) to be consistent with the usual convention for predicate-style functions. It had not yet been documented so the provisional
?) is no longer supported.
Deleting a branch is permanent. It CANNOT be undone. Continue?