On Wednesday, April 27, 2016 at 8:55:29 AM UTC-4, Alex Knauth wrote: > I'm not sure if this is what you wanted, but here's a version of your monad > file with much less weird macro stuff. It used syntax-local-introduce in two > places right next to each other, and it doesn't use datum->syntax, > syntax->datum, or format-id anywhere. It also uses functions instead of > chained splicing-let-syntax forms to make monad implementations based on > other monad implementations.
Our original implementation is almost identical to this. It assumes a fixed set of effects for all monads, each of which needs to be explicitly defined and lifted in the macro definition. It's also a bit limiting in the type of effects transformers can define (defining a lazy stream transformer with just functions is a pain). The expansion-time definitions also open the door for algebraic simplifications or partial evaluation down the line. I don't think I can use `syntax/loc' for dynamic identifiers (and still need `format-id', `syntax->datum', and `datum->syntax'). The only other weird macro stuff (that I see) is my `define-as-syntax' and use of `syntax-local-value' to preserve the definition site's scope--if there's a more canonical way to do this I'm all ears. -- You received this message because you are subscribed to the Google Groups "Racket Users" 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.

