> On Apr 27, 2016, at 2:55 AM, Nicholas Labich <labi...@gmail.com> wrote:
> 
> Thanks for the feedback. Attached is the solution applied to my original 
> implementation (only 65loc, documented). A couple of interesting points:
> 
> - My simplified example didn't show this, but I have to
>  `syntax-local-introduce' the identifiers recursively, else
>  references to symbol=? `let-syntax'-bound identifiers are
>  ambiguous. Each `returnₘ' reference can have at most one other
>  `returnₘ' identifier in scope.
> - For the `syntax-local-introduce'd identifiers to be visible in the
>  body of the `splicing-let-syntax' [line 66], recursive calls to
>  `use-monad' have to be `local-expand'ed by hand. I suppose I could
>  recur over the stack from the top down, but I would need to
>  special-case the first iteration after MId deference, which seems
>  sloppier.
> 
> If there are any fixes for this second point, I'd be interested to hear. For 
> now, this should be a good starting point.
> 
> Nick

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.

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: monad.rkt
Description: Binary data


Or do you really want it to do some specific thing with the syntax that this 
doesn't do?

Alex Knauth

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to