-
Notifications
You must be signed in to change notification settings - Fork 43
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
Simplify dual #87
base: master
Are you sure you want to change the base?
Simplify dual #87
Conversation
Up annotations have changed because they no longer need Deleteable or MList. There's are now valid traversals over the up annotations of a diagram (before they where invalid lenses) query is now also a traversal. DNode and RNode have been removed, folding a DUALTree is now done in a single pass. There's foldDia and foldDia' folding functions.
I'm not 100% about the primed versions ( I think I'll wait on matrix transforms until this is merged. |
The docs for |
Monoidal :) Always mix them up when I type them. |
fromDTree :: forall b v n. (Floating n, HasLinearMap v) | ||
=> DTree b v n Annotation -> RTree b v n Annotation | ||
fromDTree = fromDTree' mempty | ||
foldDiaWithScales |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this (and the primed version below) needs a Haddock comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'm still debating whether or not to export them (I'm currently not).
Getting rid of |
Yes, this is a potential problem. I actually (tried to) touch on the problem with rebuilding up annotations a little in #39 but never came up with a solution. I need to think about this a bit more. |
What is the status of this branch? |
It looks like a lot of the simplifying to |
So I've been thinking about this a bit and I can't come up with a solution I'm happy with. It's becoming clear to me that traversals over sub diagrams is not simple. There's a couple of options I can see:
I just had an idea of adding another option to the dual tree to allow modifying the
which would (I think) let us satisfy setter laws (but not the lens laws) and remove I've started another branch with |
Don't merge yet. See diagrams/dual-tree#7.
Up annotations have changed because they no longer need
Deleteable
orMList
. There's are now valid traversals over the up annotations of a diagram (before they where invalid lenses) query is now also a traversal.DNode
andRNode
have been removed, folding aDUALTree
is now done in a single pass usingfoldDia
andfoldDia'
folding functions.