Newest at the top
| 2025-12-03 22:37:26 +0100 | <haskellbridge> | <lucabtz> And AdditiveGroup = Group + |
| 2025-12-03 22:37:15 +0100 | <monochrom> | "instance Semigroup Sum Int", "instance Semigroup Product Int". |
| 2025-12-03 22:37:13 +0100 | <haskellbridge> | <lucabtz> Yeah it's the same as I'm saying where Additive = Monoid + |
| 2025-12-03 22:37:00 +0100 | <tomsmeding> | you need exactly the same number of instance declarations and constraints, though |
| 2025-12-03 22:36:47 +0100 | <tomsmeding> | I guess it floods the namespace less |
| 2025-12-03 22:36:32 +0100 | <tomsmeding> | monochrom: how does that help? |
| 2025-12-03 22:36:17 +0100 | <monochrom> | I would do this. Semigroup takes one more type param, it specifies the operator. Likewise for Monoid and Group. Then you just have 3 type classes, and they cover +, negate, *, recip, and, or, ... |
| 2025-12-03 22:36:14 +0100 | <tomsmeding> | (there's probably a way to make precise exactly what it is) |
| 2025-12-03 22:35:49 +0100 | <tomsmeding> | Leary: my answer would be: no, it's some kind of indexed ring. It's morally a ring, kind of, but it isn't in the strict sense, and bye goes your unique fromInteger |
| 2025-12-03 22:35:38 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
| 2025-12-03 22:34:58 +0100 | <tomsmeding> | lucabtz: I was talking about the declarations rather than the user side. But yes, the user side is even worse -- fortunately mostly addressed by synonyms, as you say |
| 2025-12-03 22:34:52 +0100 | <haskellbridge> | <lucabtz> Num would become something like AdditiveGroup & MultiplicativeGroup & FromInteger etc. |
| 2025-12-03 22:34:12 +0100 | <tomsmeding> | Leary: do matrices form a ring? |
| 2025-12-03 22:34:10 +0100 | <haskellbridge> | <lucabtz> tomsmeding that could be fixed by having an alias for a set of constraints |
| 2025-12-03 22:33:31 +0100 | <Leary> | The good reason to separate `fromInteger` is to allow literals when you don't have a ring. When you do, you always have a unique homomorphism from `Integer`, so `fromInteger` makes as much sense as your `Num` instance. |
| 2025-12-03 22:33:10 +0100 | <tomsmeding> | it would be most flexible if it was all split out, yes, though then you do get that you have to give 6 instance declarations to get anywhere for a number-like thing |
| 2025-12-03 22:32:13 +0100 | <haskellbridge> | <lucabtz> Yeah there should be Additive with just + and Multiplicative with just *, no inverses either I think |
| 2025-12-03 22:31:53 +0100 | <tomsmeding> | a six-by-seven matrix, it has been decided |
| 2025-12-03 22:31:42 +0100 | <Rembane> | Six, seven! |
| 2025-12-03 22:31:29 +0100 | <tomsmeding> | matrices can be Num just fine except that fromInteger makes no sense (what size to return?) |
| 2025-12-03 22:31:13 +0100 | <tomsmeding> | also fromInteger separately please |
| 2025-12-03 22:30:50 +0100 | <monochrom> | It's OK, a subclass of + that adds -, a subclass of * that adds / |
| 2025-12-03 22:30:15 +0100 | <EvanR> | then negative starts to make it weird |
| 2025-12-03 22:29:58 +0100 | sam113101 | (~sam@modemcable200.189-202-24.mc.videotron.ca) sam113101 |
| 2025-12-03 22:29:31 +0100 | <EvanR> | lots of stuff has only + or * not both |
| 2025-12-03 22:29:06 +0100 | <Rembane> | Hard agree |
| 2025-12-03 22:28:36 +0100 | <EvanR> | truth |
| 2025-12-03 22:25:49 +0100 | <haskellbridge> | <lucabtz> I kinda wish + and times had their own typeclasses instead of being in Num |
| 2025-12-03 22:24:44 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2025-12-03 22:24:13 +0100 | jrm | (~jrm@user/jrm) jrm |
| 2025-12-03 22:23:02 +0100 | jrm | (~jrm@user/jrm) (Client Quit) |
| 2025-12-03 22:20:01 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
| 2025-12-03 22:19:37 +0100 | jrm | (~jrm@user/jrm) jrm |
| 2025-12-03 22:18:20 +0100 | jrm | (~jrm@user/jrm) (Quit: ciao) |
| 2025-12-03 22:09:26 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2025-12-03 22:04:55 +0100 | euphores | (~SASL_euph@user/euphores) (Ping timeout: 240 seconds) |
| 2025-12-03 22:04:37 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
| 2025-12-03 21:56:58 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2025-12-03 21:55:23 +0100 | sam113101 | (~sam@modemcable200.189-202-24.mc.videotron.ca) (Read error: Connection reset by peer) |
| 2025-12-03 21:54:43 +0100 | jreicher | (~user@user/jreicher) (Quit: In transit) |
| 2025-12-03 21:53:40 +0100 | Googulator | (~Googulato@2a01-036d-0106-479c-d9ec-010d-f188-ffcb.pool6.digikabel.hu) |
| 2025-12-03 21:53:21 +0100 | Googulator | (~Googulato@2a01-036d-0106-479c-d9ec-010d-f188-ffcb.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-12-03 21:51:52 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
| 2025-12-03 21:48:31 +0100 | euphores | (~SASL_euph@user/euphores) euphores |
| 2025-12-03 21:40:55 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2025-12-03 21:40:12 +0100 | AlexNoo | (~AlexNoo@85.174.183.177) |
| 2025-12-03 21:39:45 +0100 | AlexNoo | (~AlexNoo@85.174.183.177) (Read error: Connection reset by peer) |
| 2025-12-03 21:37:07 +0100 | collide2954 | (~collide29@user/collide2954) (Quit: The Lounge - https://thelounge.chat) |
| 2025-12-03 21:36:05 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
| 2025-12-03 21:35:55 +0100 | Googulator33 | Googulator |