2025/04/01

Newest at the top

2025-04-01 14:25:42 +0200Googulator18(~Googulato@2a01-036d-0106-211a-ac5d-24c1-ad5e-7f2b.pool6.digikabel.hu)
2025-04-01 14:25:24 +0200Googulator18(~Googulato@178-164-243-34.pool.digikabel.hu) (Quit: Client closed)
2025-04-01 14:21:30 +0200merijn(~merijn@77.242.116.146) (Ping timeout: 246 seconds)
2025-04-01 14:20:15 +0200srk(~sorki@user/srk) (Ping timeout: 244 seconds)
2025-04-01 14:17:00 +0200JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2025-04-01 14:16:47 +0200 <hellwolf> makes sense.
2025-04-01 14:16:41 +0200 <hellwolf> good to know. thanks hlint.
2025-04-01 14:16:02 +0200 <hellwolf> just read the doc.
2025-04-01 14:15:56 +0200 <lambdabot> parse error (possibly incorrect indentation or mismatched brackets)
2025-04-01 14:15:56 +0200 <lambdabot> <hint>:1:64: error:
2025-04-01 14:15:54 +0200 <hellwolf> > Bang patterns do not have any effect with constructor patterns:
2025-04-01 14:15:22 +0200jespada(~jespada@2800:a4:2256:6500:9933:8787:b375:7c3e) jespada
2025-04-01 14:14:49 +0200 <hellwolf> This one I did not know. Why It is a "redundant bang pattern" using in line 4: https://paste.tomsmeding.com/1KVgpGax ?
2025-04-01 14:00:51 +0200Smiles(uid551636@id-551636.lymington.irccloud.com) Smiles
2025-04-01 13:57:28 +0200tremon(~tremon@83.80.159.219) tremon
2025-04-01 13:46:48 +0200fp(~Thunderbi@2001:708:150:10::1d80) (Ping timeout: 272 seconds)
2025-04-01 13:46:13 +0200tromp(~textual@2001:1c00:3487:1b00:29bc:7fae:9d9f:d545) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-04-01 13:45:58 +0200__monty__(~toonn@user/toonn) toonn
2025-04-01 13:44:21 +0200merijn(~merijn@77.242.116.146) merijn
2025-04-01 13:41:09 +0200merijn(~merijn@77.242.116.146) (Ping timeout: 248 seconds)
2025-04-01 13:35:41 +0200tromp(~textual@2001:1c00:3487:1b00:29bc:7fae:9d9f:d545)
2025-04-01 13:31:12 +0200 <Leary> Indeed.
2025-04-01 13:29:36 +0200 <kqr> I guess that is a vote in favour of Alternative?
2025-04-01 13:24:39 +0200 <lambdabot> (["","a"],[Nothing,Just 'a'])
2025-04-01 13:24:37 +0200 <Leary> > let test = [guard False $> 'a', guard True $> 'a'] in (test :: [String], test :: [Maybe Char])
2025-04-01 13:21:03 +0200toby-bro(~toby-bro@user/toby-bro) toby-bro
2025-04-01 13:20:24 +0200 <Leary> Well, generalising, yeah. I was thinking about `instance Semigroup a => Monoid (Maybe a)`.
2025-04-01 13:19:48 +0200 <merijn> In fact, it's like, their main distinguishing feature :p
2025-04-01 13:19:40 +0200 <merijn> Semigroups (pretty notably) do not have mempty
2025-04-01 13:19:29 +0200 <merijn> Leary: You mean Monoid
2025-04-01 13:18:53 +0200xff0x(~xff0x@2405:6580:b080:900:974d:9d72:56de:9211)
2025-04-01 13:18:34 +0200 <Leary> kqr: `mempty` would impose an unwanted `Semigroup` constraint. Also, I suspect you really want `guard`.
2025-04-01 13:18:19 +0200 <kqr> Notably, this function only uses pure and empty, it never uses operators <|> or <>
2025-04-01 13:17:33 +0200 <kqr> I guess another way to phrase the question would be "When a result is interpreted either as a Maybe a or [a], is Monoid or Alternative the most intuitive generalisation?"
2025-04-01 13:16:53 +0200 <kqr> This is in a module-private function that is called by two other exported functions, one of which specialise it to Maybe a, and the other to [a]
2025-04-01 13:16:18 +0200 <merijn> otoh, if the type is fixed to be Maybe, why not just write Nothing for readability
2025-04-01 13:16:03 +0200 <merijn> kqr: If the type is fixed to be Maybe there is not distinction
2025-04-01 13:15:08 +0200tromp(~textual@2001:1c00:3487:1b00:29bc:7fae:9d9f:d545) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-04-01 13:09:16 +0200 <kqr> I could, of course, also return a plain `Nothing` but in this case I want the function to be generic over both Maybe values and lists.
2025-04-01 13:08:58 +0200 <kqr> If I have a function returning a Maybe of something, and I want to return a Nothing, I can return `mempty` but I can also return `empty`. I have a rough intuition that `mempty` is more appropriate for things that are supposed to be aggregated together, whereas `empty` is more appropriate for things that are supposed to be used a choices. But how would I know which to use?
2025-04-01 13:06:01 +0200Smiles(uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2025-04-01 13:05:01 +0200merijn(~merijn@77.242.116.146) merijn
2025-04-01 13:02:20 +0200caconym(~caconym@user/caconym) caconym
2025-04-01 13:00:05 +0200caconym(~caconym@user/caconym) (Quit: bye)
2025-04-01 12:59:06 +0200merijn(~merijn@77.242.116.146) (Ping timeout: 265 seconds)
2025-04-01 12:58:48 +0200internatetional(~nate@2400:9800:170:c23:1:0:419:21ae) (Quit: CoreIRC for Android - www.coreirc.com)
2025-04-01 12:54:50 +0200ash3en(~Thunderbi@149.222.150.125) ash3en
2025-04-01 12:54:09 +0200acidjnk_new(~acidjnk@p200300d6e71c4f8289e7d3d4c6144767.dip0.t-ipconnect.de)
2025-04-01 12:53:56 +0200jathan(~jathan@69.61.93.38) jathan
2025-04-01 12:53:50 +0200unter-oe(~unter-oe@user/unter-oe) (Remote host closed the connection)