Support a setup that reverted #%top to its usual meaning
#183
Closed
opened 6 years ago by sorawee
·
5 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
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/markup
,#lang pollen/ptree
, etc. already, and it wouldn't interact well with this orthogonal feature.If we revert
#%top
to its usual meaning, androot
is not defined in"pollen.rkt"
, then what should happen? Consistency seems to dictate thatroot
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 calledallow-unbound-ids
. If set to#false
, it will raise an error for unbound identifiers (= the typical#%top
behavior):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 setupallow-unbound-ids
already anyway, so it's relatively easy to do.In Pollen 2.0, I changed the name of this setup to
allow-unbound-ids?
(with?
) to be consistent with the usual convention for predicate-style functions. It had not yet been documented so the provisionalallow-unbound-ids
(without?
) is no longer supported.