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.