On 2017-05-06 20:38, David Kraeutmann wrote:
The only lawful instance I can think of is:And because it's closer to the original style:
instance Functor (FunPB a) where
fmap f (FunPB g) = FunPB $ \k -> let (a,b) = g k in (a, fmap f b)
which is fairly straightforward IMO.
fmap f = FunPB .((.)((<$>).(<$>)$f)). runFunPB
Now it's STARRING INTO YOU SOUL. And it's also so much easier to read.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-caf e
Only members subscribed via the mailman list are allowed to post.