On Mon, Jan 4, 2010 at 3:01 PM, Derek Elkins <[email protected]> wrote:
> Ignoring bottoms the free theorem for fmap can be written: > > If h . p = q . g then fmap h . fmap p = fmap q . fmap g When I play with http://haskell.as9x.info/ft.html I get examples that look more like: If fmap' has the same signature as the usual fmap for a type and h . p = q . g then fmap h . fmap' p = fmap' q . fmap g >From which it follows that if fmap' id = id then fmap' is fmap. But I don't know how to prove that uniformly for all types, just the ones I generated free theorems for. -- Dan _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
