No, you're not alone! I sometimes wanted pollen to report the unbound ids for me. I actually wanted to implement this as one option in the pollen mode!
If I were you, I'd do it during decoding the root function: grab all identifiers defined in current environment, and check all tags in current document to find those not in the environment (those are unbound identifiers). On Thu, Dec 22, 2016 at 23:26 <[email protected]> wrote: > Hi! > > This might be an unpopular opinion, but I am kinda annoyed at how Pollen > let unbound identifiers become tag while sometimes it is actually my > mistake. So, I tried to get the unbound id error back: > > I modified top.rkt: > > (define-syntax-rule (top~ . id) > (if (identifier-binding #'id ) > #'id > (if (string-prefix? (symbol->string 'id) "/") > (make-default-tag-function (string->symbol (list->string (cdr > (string->list (symbol->string 'id)))))) > (error 'id)))) > > That is, any unbound id starting with / will get / stripped and become > tag. If not, it would result in an error. > > However, I don't want to modify top.rkt. It would be better if I can > override this in my pollen.rkt. But I still couldn't find a way to do it. > Do you have any suggestion? > > (Please pardon me if the macro above has any mistake. This is the first > time I write/modify a macro. Racket's macro is really awesome though!) > > > > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > "Pollen" group. > > > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > > For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "Pollen" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
