2026/02/05

Newest at the top

2026-02-05 21:02:29 +0100CiaoSen(~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 260 seconds)
2026-02-05 20:59:25 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-02-05 20:54:13 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-05 20:52:33 +0100Umeaboy(~Umeaboy@h77-53-243-72.cust.bredband2.com) Umeaboy
2026-02-05 20:49:09 +0100Square3(~Square4@user/square) (Ping timeout: 244 seconds)
2026-02-05 20:45:32 +0100Square2(~Square@user/square) Square
2026-02-05 20:44:45 +0100Lord_of_Life_Lord_of_Life
2026-02-05 20:44:41 +0100kuribas(~user@2a02-1810-2825-6000-6394-e629-adac-ea24.ip6.access.telenet.be) (Remote host closed the connection)
2026-02-05 20:43:42 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2026-02-05 20:43:42 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-02-05 20:43:24 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2026-02-05 20:42:15 +0100wickedjargon(~user@24.83.46.194) (Remote host closed the connection)
2026-02-05 20:38:25 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-05 20:27:33 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2026-02-05 20:22:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-05 20:21:18 +0100tromp(~textual@2001:1c00:3487:1b00:4842:24c6:bd5c:fe37) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-02-05 20:16:59 +0100 <Clint> i did not read it differently, ftr
2026-02-05 20:16:07 +0100 <[exa]> yap. :]
2026-02-05 20:15:49 +0100 <int-e> [exa]: Ah. FWIW to me it sounded like you did google it out of curiosity and shared the result and method, without judgement. I could see it being read differently of course.
2026-02-05 20:15:02 +0100 <Clint> i was just reading https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/pattern_synonyms.html
2026-02-05 20:14:39 +0100 <[exa]> int-e: nah the original sentence I wrote sounded a bit too much like "oh lemme google that for you" which I didn't intend
2026-02-05 20:14:30 +0100 <tomsmeding> "I want to modify constructors of a data type without modifying the API" is one of the design usecases of pattern synonyms
2026-02-05 20:14:06 +0100 <Clint> Morj: the whole point is that i want to add a field to the type without breaking the API
2026-02-05 20:14:02 +0100 <int-e> [exa]: it's fine, you can google (most) things with DuckDuckGo :P
2026-02-05 20:13:45 +0100 <[exa]> e.g. add a few constructors that don't actually have the `a`
2026-02-05 20:13:16 +0100 <[exa]> Morj: I assume the main issue is that the types would get more complex
2026-02-05 20:12:52 +0100 <[exa]> ( s/google/find/ )
2026-02-05 20:12:38 +0100 <haskellbridge> <Morj> Should I suggest to instead encode the thingy as data Thingy = Thingy a (Maybe b)?
2026-02-05 20:11:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 250 seconds)
2026-02-05 20:11:47 +0100 <[exa]> Clint: btw if you didn't google it yet, this probably does it https://stackoverflow.com/a/43839121
2026-02-05 20:09:11 +0100 <tomsmeding> perhaps not all, but many
2026-02-05 20:09:05 +0100 <tomsmeding> essentially all interesting usecases of a pattern synonym require a view pattern to define the synonym
2026-02-05 20:08:37 +0100 <[exa]> can one do such a multi-target pattern synonym without going through a view pattern?
2026-02-05 20:06:55 +0100hellwolf(~user@13cd-fe1e-a030-6e4e-0f00-4d40-07d0-2001.sta.estpak.ee) hellwolf
2026-02-05 20:06:06 +0100akegalj(~akegalj@173-245.dsl.iskon.hr) (Quit: leaving)
2026-02-05 20:05:37 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-05 20:05:27 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2026-02-05 20:01:32 +0100 <Clint> i'll give it a shot, thanks
2026-02-05 20:00:24 +0100 <[exa]> yeah, view patterns or pattern synonyms
2026-02-05 19:59:50 +0100Clintreads.
2026-02-05 19:59:04 +0100 <tomsmeding> have ConstructorV{1,2} actually be pattern synonyms that do whatever you want with the underlying Thingy definition
2026-02-05 19:58:45 +0100 <tomsmeding> pattern synonyms?
2026-02-05 19:58:35 +0100 <EvanR> o_O
2026-02-05 19:58:11 +0100 <Clint> speaking of getting wild, is there any type magic which would let me do something like data Thingy = ConstructorV1 a | ConstructorV2 a b and be able to pattern-match a ConstructorV2 value with (ConstructorV1 a)?
2026-02-05 19:58:06 +0100 <tomsmeding> I like how I get the most agreement here when I post the stupidest suggestions
2026-02-05 19:57:54 +0100__monty__(~toonn@user/toonn) (Ping timeout: 244 seconds)
2026-02-05 19:57:40 +0100 <[exa]> tomsmeding: I love that
2026-02-05 19:57:21 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) lisbeths
2026-02-05 19:56:55 +0100 <EvanR> tomsmeding, now you're talking
2026-02-05 19:56:36 +0100 <[exa]> EvanR: not really; you add instance Monad and overloaded lists and strings and labels, and you're generating this for free