2026/06/10

Newest at the top

2026-06-10 08:15:11 +0000ft(~ft@p508db0ab.dip0.t-ipconnect.de) (Quit: leaving)
2026-06-10 08:10:05 +0000chele(~chele@user/chele) chele
2026-06-10 08:02:00 +0000merijn(~merijn@77.242.116.146) merijn
2026-06-10 08:01:37 +0000emilym1(~Thunderbi@user/emilym) (Ping timeout: 266 seconds)
2026-06-10 08:01:06 +0000CiaoSen(~Jura@dynamic-046-114-169-123.46.114.pool.telefonica.de) CiaoSen
2026-06-10 07:58:34 +0000Xe(~Xe@perl/impostor/xe) Xe
2026-06-10 07:58:09 +0000luhann(~luhann@user/luhann) luhann
2026-06-10 07:57:54 +0000luhann(~luhann@user/luhann) (Quit: WeeChat 4.8.1)
2026-06-10 07:57:25 +0000CiaoSen(~Jura@dynamic-046-114-106-020.46.114.pool.telefonica.de) (Ping timeout: 244 seconds)
2026-06-10 07:56:48 +0000emilym1(~Thunderbi@user/emilym) emilym
2026-06-10 07:56:24 +0000Xe(~Xe@perl/impostor/xe) (Ping timeout: 244 seconds)
2026-06-10 07:50:27 +0000CiaoSen(~Jura@dynamic-046-114-106-020.46.114.pool.telefonica.de) CiaoSen
2026-06-10 07:47:57 +0000Axma64751Axman6
2026-06-10 07:47:48 +0000 <hc> And no, I won't use it in production code. It was just a question that came up while I wrote a pure HashMap function for a toy haskell compiler I'm working on
2026-06-10 07:46:54 +0000CiaoSen(~Jura@2a02:3033:682:5dac:4e50:ddff:fe9b:8922) (Ping timeout: 246 seconds)
2026-06-10 07:39:05 +0000 <hc> Interesting ideas, thanks
2026-06-10 07:38:48 +0000peterbecich(~Thunderbi@71.84.33.135) (Ping timeout: 255 seconds)
2026-06-10 07:37:58 +0000 <Leary> Alternatively, you can coerce `v` to some `newtype NoShow v` with `instance Show (NoShow v) where show _ = "_"`.
2026-06-10 07:34:52 +0000 <Leary> In practice, you should write something like `ppHashMap :: (k -> String) -> (v -> String) -> HashMap k v -> String` at the top level, use it to write `instance (Show k, Show v) => Show (HashMap k v)`, then wield `ppHashMap` when you lack a `Show` instance.
2026-06-10 07:34:08 +0000lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2026-06-10 07:33:15 +0000__monty__(~toonn@user/toonn) toonn
2026-06-10 07:30:50 +0000 <Leary> hc: Due to the open world assumption, you can never know that an instance does not exist, only that there isn't one in scope. Hence branching on existence doesn't actually make sense. Abusing TH or plugins to branch on in-scopedness can be done, but introduces incoherence, as your code becomes weirdly scope-dependent.
2026-06-10 07:30:50 +0000 <lortabac> they may break at the next GHC upgrade (if they haven't already)
2026-06-10 07:30:06 +0000 <lortabac> I wouldn't recommend these packages in real-world code though
2026-06-10 07:29:59 +0000 <lambdabot> :)
2026-06-10 07:29:59 +0000 <mauke> @botsnack
2026-06-10 07:29:40 +0000 <lortabac> :)
2026-06-10 07:29:35 +0000 <hc> actually, thanks to the both of you ;p
2026-06-10 07:29:24 +0000 <hc> Arrgh, tab completion error, I meant lortabac of course :}
2026-06-10 07:29:06 +0000 <lortabac> there is also Data.Constraint.Deferrable in the 'constraints' package
2026-06-10 07:28:59 +0000 <hc> lambdabot: interesting, thanks!
2026-06-10 07:27:22 +0000 <lortabac> https://github.com/rampion/constraint-unions
2026-06-10 07:27:01 +0000 <lambdabot> https://hackage.haskell.org/package/constraints-emerge
2026-06-10 07:27:01 +0000 <lortabac> @hackage constraints-emerge
2026-06-10 07:26:37 +0000 <lambdabot> https://hackage.haskell.org/package/ifctx
2026-06-10 07:26:36 +0000 <lortabac> @hackage ifctx
2026-06-10 07:25:46 +0000CiaoSen(~Jura@2a02:3033:682:5dac:4e50:ddff:fe9b:8922) CiaoSen
2026-06-10 07:25:33 +0000 <lambdabot> https://hackage.haskell.org/package/if-instance
2026-06-10 07:25:32 +0000 <lortabac> @hackage if-instance
2026-06-10 07:24:45 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2026-06-10 07:23:47 +0000 <lortabac> but in reality there are some packages that allow you to do exactly what you want
2026-06-10 07:23:17 +0000 <lortabac> hc: the short answer is that the type system doesn't allow it
2026-06-10 07:21:51 +0000 <hc> It's not a problem I need to urgently solve; I was more interested in how to solve the type system problem
2026-06-10 07:21:34 +0000 <hc> lortabac: Ok, I see, thanks
2026-06-10 07:21:21 +0000GdeVolpiano(~GdeVolpia@user/GdeVolpiano) GdeVolpiano
2026-06-10 07:17:35 +0000GdeVolpiano(~GdeVolpia@user/GdeVolpiano) (Client Quit)
2026-06-10 07:17:30 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-06-10 07:16:59 +0000GdeVolpiano(~GdeVolpia@user/GdeVolpiano) GdeVolpiano
2026-06-10 07:15:41 +0000peterbecich(~Thunderbi@71.84.33.135) peterbecich
2026-06-10 07:14:41 +0000petrichor(~jez@user/petrichor) petrichor