[Haskell-cafe] HXT and types in Control.Arrow.ArrowTree

Albert Y. C. Lai trebla at vex.net
Sun Mar 23 13:53:55 EDT 2008


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.



More information about the Haskell-Cafe mailing list