-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tyxml combinators #12
base: master
Are you sure you want to change the base?
Conversation
Note that there is a bug I don't understand in Drup@439b301 |
I'm gonna take a look at this later tonight or tomorrow. |
Might be "getting" tyxml a bit more after browsing this. More soon. |
Note that the example is quite contrived on purpose (in order to test both |
Put the unsafe version in an Unsafe module.
Rebased. |
In fact, the enter stuff doesn't really work and I can't manage to fix it properly. I tried to use |
First two commits are from #10
It seems that this iteration of the interface doesn't explode too easily, so there we go!
It handles both usual selection and enter selection (with a hack). It allows both to put tyxml in d3 and d3 in tyxml (although you can break typing that way, see later).
The way to use this is the following: you create a function producing tyxml elements depending on data. Both the elements and the layout can change depending on the data. Deep hierarchy works fine.
Then you turn it into a d3 element:
d3 f
At the moment, since tyxml element don't carry the type of data with them, it's possible to break typing by doing :
d3 (inject ...)
. I'm not sure how I feel about that ...