You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
isLeaf :: Context a b -> Bool
isLeaf (_, _, _, [ ]) = True
isLeaf (_, _, _, _ ) = False
tearLeaves = let p x = if isLeaf x then Nothing else Just x in gfiltermap p
This can be remedied by making GDecomp an instance of comonad. gmap can then be defined in terms of extend on non-empty graphs, and the definition for an empty graph is trivial to add. I rolled it out at home and it seems to work.
So, in principle it is not a problem to define reasonable maps, therefore I think it is fair to say that we have a bug. I should like to contribute some code to remedy this situation if the maintainers are willing to review and merge.
Consider this code:
Example:
As you see, we obtain a hanging edge.
I propose
gfiltermap
is improved so that validity of graphs is preserved.The text was updated successfully, but these errors were encountered: