Newest at the top
| 2025-11-25 16:54:56 +0100 | euphores | (~SASL_euph@user/euphores) euphores |
| 2025-11-25 16:47:52 +0100 | typedfern__ | (~Typedfern@15.red-83-37-26.dynamicip.rima-tde.net) typedfern |
| 2025-11-25 16:46:32 +0100 | typedfern__ | (~Typedfern@15.red-83-37-26.dynamicip.rima-tde.net) (Ping timeout: 240 seconds) |
| 2025-11-25 16:40:26 +0100 | <merijn> | Leary: Sure, but a required should've been that the mapping is dense and boundscheck should've made more sense |
| 2025-11-25 16:39:38 +0100 | <Leary> | merijn: `(to|from)Enum` are easier to get right than the tricky details of the other methods, and should only be used to write them by proxy. You can argue that they shouldn't be part of the class (e.g. they could be written as local helpers on a per-instance basis and mapped over the methods of `Enum Int`), but then you lose the convenience of method defaults. |
| 2025-11-25 16:34:57 +0100 | <haskellbridge> | <Morj> Otherwise I just write monomorphic functions for my own type that I need to convert to-from Int |
| 2025-11-25 16:33:14 +0100 | <haskellbridge> | <Morj> The good thing about Enum is that fromEnum @Char is exported in prelude, and ord isn't |
| 2025-11-25 16:31:15 +0100 | sindu | (~sindu@2.148.32.207.tmi.telenormobil.no) |
| 2025-11-25 16:31:15 +0100 | weary-traveler | (~user@user/user363627) (Ping timeout: 240 seconds) |
| 2025-11-25 16:30:50 +0100 | <merijn> | I dunno what happened in my brain there, glitching two conversations together xD |
| 2025-11-25 16:30:38 +0100 | <merijn> | -AI+class |
| 2025-11-25 16:29:54 +0100 | <merijn> | Leary: The AI going through Int but not ensuring that's safe is definitely bad |
| 2025-11-25 16:28:45 +0100 | <dutchie> | if i was going to refactor I think it'd make sense to have my bounds in a Reader somewhere |
| 2025-11-25 16:27:51 +0100 | <dutchie> | yeah it's almost certainly overkill to have it that generic |
| 2025-11-25 16:27:28 +0100 | Fischmiep | (~Fischmiep@user/Fischmiep) Fischmiep |
| 2025-11-25 16:27:25 +0100 | <Leary> | dutchie: Rather than trying to be generic in `Enum`, perhaps just use `Int` with explicit bounds? That can always be generalised to `Enum a` if you really need it to. |
| 2025-11-25 16:26:55 +0100 | Googulator | (~Googulato@2a01-036d-0106-4ad8-11e2-562e-881b-eb37.pool6.digikabel.hu) |
| 2025-11-25 16:26:36 +0100 | <Leary> | `class Enum` is an implementation detail of `[a(, b) .. (c)]` notation, and `(to|from)Enum` of the necessary `enumFrom*` methods. What's bad is that these details aren't hidden, inviting abuse. `succ`/`pred`, which are thrown in on principle, are perhaps the only truly user-facing part of the class. |
| 2025-11-25 16:25:52 +0100 | Fischmiep | (~Fischmiep@user/Fischmiep) (Quit: ZNC - https://znc.in) |
| 2025-11-25 16:24:56 +0100 | Square3 | (~Square@user/square) Square |
| 2025-11-25 16:23:36 +0100 | srazkvt | (~sarah@user/srazkvt) (Quit: Konversation terminated!) |
| 2025-11-25 16:19:49 +0100 | <dutchie> | nudge a square on a grid, so Maybe Neighbour |
| 2025-11-25 16:19:02 +0100 | trickard_ | trickard |
| 2025-11-25 16:18:51 +0100 | <merijn> | dutchie: What are you using maybeToEnum for? |
| 2025-11-25 16:18:25 +0100 | <dutchie> | at least these are my own Enum instances (faking a bounded Int class) and so I know they are dense |
| 2025-11-25 16:17:52 +0100 | <lambdabot> | concatMap (\ a -> case a of { Just x -> [x]; _ -> []}) xs |
| 2025-11-25 16:17:52 +0100 | <alex`> | @undo [x | Just x <- xs] |
| 2025-11-25 16:17:39 +0100 | alex` | (~user@251.red-83-33-249.dynamicip.rima-tde.net) |
| 2025-11-25 16:15:04 +0100 | <merijn> | Enum is an awful, awful class and it should feel bad |
| 2025-11-25 16:14:56 +0100 | <merijn> | Like I said |
| 2025-11-25 16:14:41 +0100 | <dutchie> | ah true, even worse |
| 2025-11-25 16:14:15 +0100 | <merijn> | dutchie: Incidentally, that may *still* fail, if the enum instance isn't dense |
| 2025-11-25 16:13:28 +0100 | <haskellbridge> | <Zemyla> In addition to the standard parens function, there should be a parens', which is guaranteed to parse all parentheses. |
| 2025-11-25 16:13:23 +0100 | <merijn> | Enum is an awful awful class and it should feel bad >.> |
| 2025-11-25 16:12:51 +0100 | <dutchie> | https://paste.tomsmeding.com/MLNFAoXl this feels dumb |
| 2025-11-25 16:05:51 +0100 | td_ | (~td@i5387092E.versanet.de) |
| 2025-11-25 16:05:14 +0100 | potatoespotatoes | (~quassel@user/potatoespotatoes) potatoespotatoes |
| 2025-11-25 16:04:52 +0100 | potatoespotatoes | (~quassel@user/potatoespotatoes) (Client Quit) |
| 2025-11-25 16:01:34 +0100 | merijn | (~merijn@77.242.116.146) merijn |
| 2025-11-25 16:00:40 +0100 | potatoespotatoes | (~quassel@user/potatoespotatoes) potatoespotatoes |
| 2025-11-25 15:58:17 +0100 | potatoespotatoes | (~quassel@user/potatoespotatoes) () |
| 2025-11-25 15:55:23 +0100 | itaipu | (~itaipu@168.121.97.28) itaipu |
| 2025-11-25 15:55:15 +0100 | Googulator85 | (~Googulato@2a01-036d-0106-01f1-f56c-45b8-e3c8-fdbd.pool6.digikabel.hu) (Ping timeout: 250 seconds) |
| 2025-11-25 15:49:18 +0100 | kritzefitz | (~kritzefit@debian/kritzefitz) (Ping timeout: 252 seconds) |
| 2025-11-25 15:46:32 +0100 | comerijn | (~merijn@77.242.116.146) (Ping timeout: 240 seconds) |
| 2025-11-25 15:45:50 +0100 | Googulator73 | (~Googulato@2a01-036d-0106-01f1-f56c-45b8-e3c8-fdbd.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-25 15:45:45 +0100 | Googulator85 | (~Googulato@2a01-036d-0106-01f1-f56c-45b8-e3c8-fdbd.pool6.digikabel.hu) |
| 2025-11-25 15:43:29 +0100 | trickard_ | (~trickard@cpe-92-98-47-163.wireline.com.au) |
| 2025-11-25 15:43:14 +0100 | trickard_ | (~trickard@cpe-92-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-25 15:42:04 +0100 | itaipu | (~itaipu@168.121.97.28) (Ping timeout: 256 seconds) |