Newest at the top
2024-12-23 19:03:44 +0100 | <hseg> | so you just pollute your version constraints with "for this version, I need this compatibility shim" rather than the code itself |
2024-12-23 19:03:44 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-23 19:02:29 +0100 | <hseg> | tbh, this feels like one of those things that a more backpack-y ecosystem might do better |
2024-12-23 19:02:23 +0100 | manny__ | (~manny@static-68-235-46-164.cust.tzulo.com) (Quit: Quit) |
2024-12-23 19:01:30 +0100 | <hseg> | hm, that _is_ a fair point |
2024-12-23 19:01:18 +0100 | <hseg> | right. I'm more referring to the fact that I'm stuck either duplicating the test or moving the import, neither of which is good for readability |
2024-12-23 19:01:11 +0100 | <hololeap> | I guess you could shove the CPP stuff into its own module so it isn't stinking up the rest of your code :p |
2024-12-23 19:00:40 +0100 | manwithluck | (~manwithlu@194.177.28.164) manwithluck |
2024-12-23 18:59:50 +0100 | <hololeap> | a necessary evil sometimes |
2024-12-23 18:59:38 +0100 | <hololeap> | CPP is never very pretty. it's usually just a compatibility shim |
2024-12-23 18:59:23 +0100 | <hseg> | ... actually no, idk that that's that much more readable |
2024-12-23 18:58:58 +0100 | <hseg> | fair. a bit of a shame, though, though tbf otoh that forces the code to be somewhat more readable |
2024-12-23 18:58:27 +0100 | <hololeap> | like, one for the import and one for the actual code |
2024-12-23 18:58:15 +0100 | <hellwolf> | Btw, talking about interleaving imports and definitions; I would even go further, say, defining multiple modules in a single file could be rad for writing single file cabal scripts, e.g. |
2024-12-23 18:58:11 +0100 | <hololeap> | you might have to split it up into several identical #if blocks |
2024-12-23 18:57:58 +0100 | <hseg> | (so to support old and new versions, I need to define a shim) |
2024-12-23 18:57:43 +0100 | <hellwolf> | Noted. I am sold. I will give it a look. |
2024-12-23 18:57:43 +0100 | <hellwolf> | 12-23 19:54 <hololeap> it's a super useful package, definitely one to keep in your toolbox |
2024-12-23 18:57:34 +0100 | <hseg> | (optparse-applicative renamed text :: String -> Doc to pretty :: String -> Doc a) |
2024-12-23 18:57:19 +0100 | manwithluck | (~manwithlu@194.177.28.164) (Read error: Connection reset by peer) |
2024-12-23 18:57:11 +0100 | <hseg> | hm. am encountering this since I'm using CPP to conditionally define a shim |
2024-12-23 18:56:12 +0100 | <c_wraith> | yeah. imports have to be at the top. (more or less. after the module declaration) |
2024-12-23 18:55:20 +0100 | <hseg> | is it illegal to interleave definitions and imports? |
2024-12-23 18:54:04 +0100 | <hololeap> | it's a super useful package, definitely one to keep in your toolbox |
2024-12-23 18:53:34 +0100 | <hololeap> | well, mapMaybe is generalized to Functors, 'wither' is like a stronger traverse that can remove elements |
2024-12-23 18:53:11 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
2024-12-23 18:52:40 +0100 | <hellwolf> | btw, I just finished the latest haskell interlude podcast: https://haskell.foundation/podcast/60/ . good talk, recommended to listen in. |
2024-12-23 18:52:14 +0100 | <hellwolf> | i see |
2024-12-23 18:51:30 +0100 | <hololeap> | it generalizes mapMaybe to other applicatives besides lists |
2024-12-23 18:50:47 +0100 | <hellwolf> | huh, I can't tell what does that package do just from its name. |
2024-12-23 18:48:50 +0100 | tnt2 | tnt1 |
2024-12-23 18:48:50 +0100 | tnt1 | (~Thunderbi@user/tnt1) (Ping timeout: 265 seconds) |
2024-12-23 18:48:36 +0100 | tnt2 | (~Thunderbi@user/tnt1) tnt1 |
2024-12-23 18:48:23 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-23 18:47:06 +0100 | <c_wraith> | you're looking for the wither function from the witherable package |
2024-12-23 18:46:45 +0100 | <c_wraith> | not in base. |
2024-12-23 18:43:59 +0100 | <hellwolf> | ^-- is there way to rewrite this using mapMaybe |
2024-12-23 18:43:59 +0100 | <hellwolf> | mapM (compile_fn_dispatcher ind') fns <&> catMaybes |
2024-12-23 18:43:28 +0100 | manwithluck | (~manwithlu@194.177.28.164) manwithluck |
2024-12-23 18:43:15 +0100 | manwithluck | (~manwithlu@194.177.28.164) (Ping timeout: 244 seconds) |
2024-12-23 18:40:22 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
2024-12-23 18:40:16 +0100 | talismanick | (~user@2601:644:937c:ed10::ae5) talismanick |
2024-12-23 18:39:30 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-12-23 18:38:02 +0100 | simplystuart | (~simplystu@c-75-75-152-164.hsd1.pa.comcast.net) |
2024-12-23 18:33:33 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-23 18:29:17 +0100 | econo_ | (uid147250@id-147250.tinside.irccloud.com) |
2024-12-23 18:23:32 +0100 | simplystuart | (~simplystu@c-75-75-152-164.hsd1.pa.comcast.net) (Ping timeout: 264 seconds) |
2024-12-23 18:22:56 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
2024-12-23 18:18:10 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-23 18:07:45 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |