Newest at the top
2025-05-09 23:32:01 +0200 | ystael | (~ystael@user/ystael) (Ping timeout: 252 seconds) |
2025-05-09 23:21:05 +0200 | <dutchie> | it seems that the laws which should hold aren't obvious: https://wiki.haskell.org/MonadPlus |
2025-05-09 23:12:09 +0200 | <monochrom> | Laws of MonadPlus could easily be conditional laws of Alternative, e.g., "if an instance of Alternative is also an instance of Monad, then empty >>= k = ...". That would not be the first time we did that. Already in the Haskell Report, "For any type that is an instance of class Bounded as well as Enum, the following should hold:". |
2025-05-09 23:12:05 +0200 | Frostillicus | (~Frostilli@pool-71-174-119-56.bstnma.fios.verizon.net) |
2025-05-09 23:11:44 +0200 | tolgo | (~Thunderbi@199.115.144.130) (Quit: tolgo) |
2025-05-09 23:10:05 +0200 | eron | (~eron@179.118.250.144) lidenbrock |
2025-05-09 23:09:45 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-05-09 23:03:03 +0200 | driib318 | (~driib@vmi931078.contaboserver.net) driib |
2025-05-09 23:00:52 +0200 | j1n37- | (~j1n37@user/j1n37) (Ping timeout: 252 seconds) |
2025-05-09 23:00:13 +0200 | j1n37 | (~j1n37@user/j1n37) j1n37 |
2025-05-09 22:59:10 +0200 | <Rembane> | That sounds reasonable. |
2025-05-09 22:56:42 +0200 | sabathan2 | (~sabathan@amarseille-159-1-12-107.w86-203.abo.wanadoo.fr) |
2025-05-09 22:56:39 +0200 | <dutchie> | but I'm pretty sure I do want mzero >>= f to always be mzero |
2025-05-09 22:56:11 +0200 | <dutchie> | (although to be completely honest, I'm only ever calling this with the one monad anyway so it's all a bit academic) |
2025-05-09 22:55:50 +0200 | <dutchie> | well, reading about what the extra assurances that MonadPlus gives me, I think I do want those assurances after all |
2025-05-09 22:55:21 +0200 | <Rembane> | dutchie: That makes me think that you don't need the assurances of MonadPlus and can safely go for Alternative. |
2025-05-09 22:53:12 +0200 | <dutchie> | but that doesn't really help me decide whether I should use mzero or empty / do MonadPlus m => or Alternative f => |
2025-05-09 22:52:55 +0200 | sabathan2 | (~sabathan@amarseille-159-1-12-107.w86-203.abo.wanadoo.fr) (Read error: Connection reset by peer) |
2025-05-09 22:50:58 +0200 | Frostillicus | (~Frostilli@pool-71-174-119-56.bstnma.fios.verizon.net) (Ping timeout: 252 seconds) |
2025-05-09 22:50:55 +0200 | <dutchie> | ah, https://stackoverflow.com/a/10168111 suggests that MonadPlus has extra laws to satisfy compared to Alternative |
2025-05-09 22:46:55 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2025-05-09 22:45:57 +0200 | <dutchie> | I guess I'm unclear about whether there's any instances of MonadPlus that aren't Alternative |
2025-05-09 22:45:16 +0200 | <dutchie> | empty (from Alternative) and mzero from MonadPlus should always be the same thing, right? |
2025-05-09 22:40:35 +0200 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2025-05-09 22:39:58 +0200 | fp | (~Thunderbi@hof1.kyla.fi) (Ping timeout: 252 seconds) |
2025-05-09 22:31:14 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla |
2025-05-09 22:28:38 +0200 | tolgo | (~Thunderbi@199.115.144.130) |
2025-05-09 22:23:44 +0200 | Frostillicus | (~Frostilli@pool-71-174-119-56.bstnma.fios.verizon.net) |
2025-05-09 22:18:35 +0200 | <EvanR> | Theory of Objects has such methods, but I don't remember what jargon if any was used |
2025-05-09 22:15:13 +0200 | todi | (~todi@p57803331.dip0.t-ipconnect.de) (Quit: ZNC - https://znc.in) |
2025-05-09 22:14:30 +0200 | Frostillicus | (~Frostilli@pool-71-174-119-56.bstnma.fios.verizon.net) (Ping timeout: 244 seconds) |
2025-05-09 22:14:23 +0200 | <mauke> | immutator |
2025-05-09 22:13:09 +0200 | poscat | (~poscat@user/poscat) (Ping timeout: 248 seconds) |
2025-05-09 22:10:48 +0200 | <EvanR> | immutable update |
2025-05-09 22:10:24 +0200 | poscat0x04 | (~poscat@user/poscat) poscat |
2025-05-09 22:10:16 +0200 | hgolden | (~hgolden@2603:8000:9d00:3ed1:88e0:76ff:fe9c:b21e) hgolden |
2025-05-09 22:09:00 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) Unicorn_Princess |
2025-05-09 22:08:29 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-05-09 22:07:47 +0200 | takuan | (~takuan@d8D86B601.access.telenet.be) (Remote host closed the connection) |
2025-05-09 22:05:55 +0200 | chiselfuse | (~chiselfus@user/chiselfuse) chiselfuse |
2025-05-09 22:05:03 +0200 | <int-e> | (too generic, I know) |
2025-05-09 22:04:55 +0200 | <int-e> | a constructor ;) |
2025-05-09 22:04:44 +0200 | <haskellbridge> | <hellwolf> copy on write |
2025-05-09 22:04:13 +0200 | jcarpenter2 | (~lol@2603:3016:1e01:b960:740e:a7b5:ac86:87b2) (Ping timeout: 276 seconds) |
2025-05-09 22:04:13 +0200 | <mauke> | in OO, is there a term for mutator methods that don't actually mutate the object but return a modified copy? |
2025-05-09 22:04:00 +0200 | thinkpad | (~thinkpad@148.252.128.12) (Client Quit) |
2025-05-09 22:03:35 +0200 | thinkpad | (~thinkpad@148.252.128.12) |
2025-05-09 22:01:01 +0200 | hgolden_ | (~hgolden@2603:8000:9d00:3ed1:88e0:76ff:fe9c:b21e) (Remote host closed the connection) |
2025-05-09 21:59:44 +0200 | lol_ | (~lol@2603:3016:1e01:b960:d5f4:984e:ebc2:54f8) |
2025-05-09 21:57:04 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds) |