
23 Aug
2012
23 Aug
'12
8:53 p.m.
On Fri, Aug 24, 2012 at 12:08:04AM +0100, roconnor@theorem.ca wrote:
With such wide spread agreement going back at least 6 years, I think it is time to add the following 2 laws to the documentation for Data.Traversable.Traversable.
(1) traverse Identity == Identity (2) traverse (Compose . fmap g . f) == Compose . fmap (traverse g) . traverse f
Sounds good (except that Identity and Compose aren't defined in base). I guess you're assuming that the naturality property, i.e. (3) traverse (t . f) = t . traverse f for any Applicative transformation t, is automatic. Even so it would be useful to state it.