
23 Mar
2008
23 Mar
'08
1:53 p.m.
Robert Vollmert wrote:
In short, I'm constantly running into what appear to be artificial type restrictions in Control.Arrow.ArrowTree. For example, the signature of "deep" is
deep :: (Tree t, ArrowTree a) => a (t b) (t b) -> a (t b) (t b)
instead of the more general
deep :: (Tree t, ArrowTree a) => a (t b) c -> a (t b) c
You are right, there is no harm generalizing deep, since a related combinator, multi, has the more general type. Meanwhile, I don't think
deep (hasName "a") >>> getLink
looks too bad. :) Under suitable assumptions, you can use multi getLink if you want.