On 10/03/2016 06:38 PM, Jack Firth wrote:
So I'm reading a file in as code and expanding it, then looking for values in a 
certain
syntax property that macros in the expanded code attach. This works fine for 
prefab
structs, but I can't seem to get it to work with transparent structs. The issue 
is that
the struct values can be extracted just fine, but they don't satisfy the struct 
predicate
because a different module instance is used to construct them during expansion 
from
the one I use to analyze the extracted values. I found 
`namespace-attach-module`,
but there's a phase-difference involved because I'm trying to get expansion-time
constructed structs and manipulate them at runtime. I could just leave the 
struct as
prefab, or define it in a cross-phase-persistent module, but then I don't get 
to do
things like implement the gen:custom-write interface. What can I do?

You could declare a cross-phase-persistent struct type *property* as a basis for communication and then declare a struct that implements it in a normal module, where you can also implement a custom write.

Ryan

--
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