# HG changeset patch # User HackBot # Date 1371035527 0 # Node ID 76650e2fc100791280d3baa41e66d8db291bca2a # Parent 1c1bd4bef6f7b9a529358f3910d5d0ffdc47c223 pastelogs shachaf.*profunctor diff -r 1c1bd4bef6f7 -r 76650e2fc100 paste/paste.26426 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paste/paste.26426 Wed Jun 12 11:12:07 2013 +0000 @@ -0,0 +1,47 @@ +2012-12-21.txt:21:17:04: zzo38: How about Profunctor? +2012-12-23.txt:22:46:51: p is usually a profunctor +2012-12-30.txt:07:11:01: monqy: are you an expert in corepresentable profunctors too +2012-12-31.txt:20:57:31: `quote profunctor +2013-01-02.txt:04:32:12: +findOf :: (RepresentableProfunctor p, Profunctor q, Comonad (Rep p)) => Overloading p q (Accessor (Endo (Maybe a))) s t a b -> p a Bool -> q s (Maybe a) +2013-01-02.txt:04:38:47: +imapMOf_ :: (Profunctor q, Monad m) => Overloading (Indexed i) q (Accessor (Sequenced m)) s t a b -> (i -> a -> m r) -> q s (m ()) +2013-01-02.txt:04:38:50: +iconcatMapOf :: Profunctor q => Overloading (Indexed i) q (Accessor [r]) s t a b -> (i -> a -> [r]) -> q s [r] +2013-01-02.txt:04:38:54: +ifindOf :: Profunctor q => Overloading (Indexed i) q (Accessor (Endo (Maybe a))) s t a b -> (i -> a -> Bool) -> q s (Maybe a) +2013-01-02.txt:04:38:57: +itoListOf :: Profunctor q => Overloading (Indexed i) q (Accessor (Endo [(i,a)])) s t a b -> q s [(i,a)] +2013-01-02.txt:05:00:28: There's a class Profunctor p where lmap :: (a -> b) -> p b c -> p a c; rmap :: (b -> c) -> p a b -> p a c +2013-01-02.txt:05:02:59: zzo38: We have a lot of (co)representable profunctors. +2013-01-02.txt:05:05:41: Not all instances of Profunctor are categories. +2013-01-02.txt:05:08:20: So you can use profunctors to make this different representation of lenses. +2013-01-02.txt:05:09:09: If you pick Profunctor as your constraint, what you get is an isomorphism. +2013-01-02.txt:05:11:44: (forall f. Profunctor f => p a b -> p s t) ~~ (s -> a, b -> t) +2013-01-02.txt:05:12:10: It's a very polymorphic function, so it knows almost nothing about which profunctor you're using. +2013-01-02.txt:05:14:11: (This means that you have to pick some specific concrete profunctor to use.) +2013-01-02.txt:05:19:44: Try to make it a Profunctor instance. :-) +2013-01-02.txt:05:27:40: So pretty much the same trick works for profunctors. +2013-01-02.txt:05:34:58: So that's the basic idea of profunctor lenses. +2013-01-02.txt:05:38:22: +ifindOf :: Profunctor q => Overloading (Indexed i) q (Accessor (Endo (Maybe a))) s t a b -> (i -> a -> Bool) -> q s (Maybe a) +2013-01-02.txt:05:39:34: shachaf: well, this isn't quite profunctor stuff directly +2013-01-02.txt:05:47:14: So we get (Profunctor p, Indexable i p, Coindexable j q, Applicative f) => p a (f b) -> q s (f t) +2013-01-02.txt:05:52:50: pins :: (Bizarre p q w, RepresentableProfunctor p) => q (w a b t) [Rep p a] +2013-01-02.txt:16:52:57: i love profunctors +2013-01-03.txt:23:35:38: profunctors +2013-01-04.txt:05:38:45: `echo symmetric lenses > profunctor lenses +2013-01-09.txt:16:12:51: A profunctor lens is representable as either (p a b -> p s t) or as (q t s -> q b a) +2013-01-10.txt:01:40:26: (Well, the last one is just the contravariant half of a profunctor, actually.) +2013-01-10.txt:02:01:47: I suppose that only comes about from categories. With profunctors you get sane (but weird) things. +2013-01-13.txt:22:56:40: monqy: btw did you hear about the "latest advances in profunctor lenses" +2013-01-13.txt:22:57:45: old profunctor lenses = worst thing ever +2013-01-13.txt:23:23:16: Lots of useful profunctors aren't categories. +2013-01-13.txt:23:32:38: monqy: btw edwardk shipped the new profunctors +2013-01-29.txt:10:39:22: coppro: So can you tell me about things that are corepresentable by a costrong copprofunctor? +2013-02-03.txt:08:33:50: and if you think about it profunctor-lenses and simple-lenses are related to "substitutatutatatututability" +2013-02-03.txt:09:18:55: i think these two have a "common superclass" (other than profunctor) +2013-02-03.txt:17:55:06: kmc: And I think functor/profunctor lenses correspond to Liskov substitutability. +2013-02-13.txt:22:15:41: profunctors are better +2013-02-25.txt:21:35:48: monqy: are profunctors dumb +2013-02-25.txt:21:36:08: shachaf: profunctors are time-traveling evil monstrosities. +2013-02-25.txt:21:36:15: monqy: what about profunctor + strong + choice + category +2013-02-25.txt:21:37:14: profunctor + strong + category +2013-04-02.txt:02:35:31: shachaf: eek it's spreading https://www.fpcomplete.com/user/liyang/profunctors +2013-04-02.txt:05:59:51: Bike: elliott thinks profunctors are too hard for you. +2013-04-08.txt:01:38:25: did you learn about profunctors yet ............... +2013-06-12.txt:11:05:06: mnoqy: do you understand profunctor lenslikes