Newest at the top
2025-03-28 20:00:48 +0100 | zungi | (~tory@user/andrewchawk) (Ping timeout: 264 seconds) |
2025-03-28 20:00:44 +0100 | caconym | (~caconym@user/caconym) caconym |
2025-03-28 20:00:15 +0100 | wildsalander | (~wildsalan@37-33-20-77.bb.dnainternet.fi) |
2025-03-28 20:00:05 +0100 | <tomsmeding> | +g |
2025-03-28 20:00:03 +0100 | <tomsmeding> | fun exercise: prove that "(x <$> y) <$> z" and "x <$> (y <$> z)" do exactly the same thin |
2025-03-28 20:00:01 +0100 | caconym | (~caconym@user/caconym) (Quit: bye) |
2025-03-28 19:57:40 +0100 | <yahb2> | (<$>) :: Functor f => (a -> b) -> f a -> f b ; -- Defined in ‘GHC.Internal.Data.Functor’ ; infixl 4 <$> |
2025-03-28 19:57:40 +0100 | <tomsmeding> | % :i <$> |
2025-03-28 19:57:34 +0100 | <tomsmeding> | absence: what about simply "f' <$> g' <$> h' <$> a'"? |
2025-03-28 19:44:48 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-28 19:44:10 +0100 | slack1256 | (~slack1256@2803:c600:5111:9ab8:84f4:ae24:2907:edab) slack1256 |
2025-03-28 19:40:09 +0100 | euphores | (~SASL_euph@user/euphores) euphores |
2025-03-28 19:39:16 +0100 | euphores | (~SASL_euph@user/euphores) (Remote host closed the connection) |
2025-03-28 19:31:13 +0100 | acidjnk | (~acidjnk@p200300d6e71c4f71c835c1b6e3010b6c.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
2025-03-28 19:31:12 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-03-28 19:23:16 +0100 | Googulator | (~Googulato@2a01-036d-0106-01d5-ac5d-24c1-ad5e-7f2b.pool6.digikabel.hu) |
2025-03-28 19:23:05 +0100 | aetepe | (~aetepe@188.119.58.34) aetepe |
2025-03-28 19:18:30 +0100 | tromp | (~textual@2001:1c00:3487:1b00:6095:11f3:6fa5:fb3d) |
2025-03-28 19:09:35 +0100 | malte | (~malte@mal.tc) malte |
2025-03-28 19:05:18 +0100 | <absence> | You may be right, but I run into the same RankN problem: Couldn't match type: forall a. m a -> n a with: b -> c |
2025-03-28 19:02:35 +0100 | tromp | (~textual@2001:1c00:3487:1b00:6095:11f3:6fa5:fb3d) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2025-03-28 19:00:15 +0100 | malte | (~malte@mal.tc) (Remote host closed the connection) |
2025-03-28 18:56:48 +0100 | <monochrom> | Come to think of it, I probably once used Applicative laws to prove something related. |
2025-03-28 18:56:36 +0100 | aetepe | (~aetepe@188.119.58.34) (Ping timeout: 252 seconds) |
2025-03-28 18:55:16 +0100 | <monochrom> | Does "(\f g h a -> f (g (h a))) <$> f' <*> g' <*> h' <*> a'" simply mean f' <*> (g' <*> (h' <*> a')) ? |
2025-03-28 18:53:42 +0100 | <c_wraith> | Eh. The lens library uses ALens (or whatever) in a lot of contexts where it'd otherwise need RankN |
2025-03-28 18:52:08 +0100 | <monochrom> | I think (.) already works with RankN. It is why the lens library has no type error. |
2025-03-28 18:50:16 +0100 | <absence> | Is it possible to define a generic (.) that works with RankN, or would it have to be a more specific one for the structures I have? |
2025-03-28 18:48:07 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) (Ping timeout: 265 seconds) |
2025-03-28 18:46:02 +0100 | <merijn> | absence: Can't you fix it with explicit RankN type annotations? |
2025-03-28 18:45:15 +0100 | <absence> | Ugh, "of course" I'm using impredicative types, so that fails in the same way as the regular (.) does, but other than that I guess it would've worked. |
2025-03-28 18:45:01 +0100 | OlzhasYergali | (~OlzhasYer@188.130.156.6) (Quit: Client closed) |
2025-03-28 18:42:27 +0100 | target_i | (~target_i@user/target-i/x-6023099) target_i |
2025-03-28 18:42:13 +0100 | <merijn> | Maybe reverse the arguments depending on how you want it to line up |
2025-03-28 18:41:49 +0100 | <lambdabot> | Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c) |
2025-03-28 18:41:48 +0100 | <merijn> | :t let f <.> g = (.) <$> f <*> g in (<.>) |
2025-03-28 18:41:24 +0100 | alp | (~alp@2001:861:8ca0:4940:10d7:35fd:1caf:385) |
2025-03-28 18:41:02 +0100 | <merijn> | absence: You an just define <.> as custom operator? :) |
2025-03-28 18:40:19 +0100 | <merijn> | Bowuigi: No, because that only works for Endo |
2025-03-28 18:40:03 +0100 | <haskellbridge> | <Bowuigi> Would some fold/traversal with liftA2 work? |
2025-03-28 18:39:56 +0100 | ubert1 | (~Thunderbi@2a02:8109:ab8a:5a00:7d86:d0e8:c2d1:2ee3) (Remote host closed the connection) |
2025-03-28 18:39:39 +0100 | <merijn> | absence: I mean, you could just define that? :) |
2025-03-28 18:39:25 +0100 | tromp | (~textual@2001:1c00:3487:1b00:6095:11f3:6fa5:fb3d) |
2025-03-28 18:38:51 +0100 | <absence> | Hm, I guess it's kind of an applicative version of (.)? |
2025-03-28 18:35:41 +0100 | euphores | (~SASL_euph@user/euphores) euphores |
2025-03-28 18:32:44 +0100 | <merijn> | yeah, I was thinking just traverse + some fold |
2025-03-28 18:32:17 +0100 | <absence> | No, otherwise I guess it would be easier... |
2025-03-28 18:31:56 +0100 | <merijn> | i.e. "a -> a" functions? |
2025-03-28 18:31:50 +0100 | <merijn> | absence: Are they all Endo functors? |
2025-03-28 18:31:38 +0100 | <merijn> | ah, wait |