Logs: liberachat/#haskell
| 2025-10-15 10:34:54 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 252 seconds) |
| 2025-10-15 10:39:45 | → | enikar joins (~enikar@user/enikar) |
| 2025-10-15 10:42:34 | × | V quits (~v@ircpuzzles/2022/april/winner/V) (Remote host closed the connection) |
| 2025-10-15 10:44:33 | → | titusg joins (~user@31.94.22.246) |
| 2025-10-15 10:45:36 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-10-15 10:46:26 | × | craunts795335385 quits (~craunts@136.158.7.194) (Quit: The Lounge - https://thelounge.chat) |
| 2025-10-15 10:46:44 | <titusg> | how can I make cabal repl load the modules from my project, without having to do it with :m +? |
| 2025-10-15 10:50:40 | <[exa]> | titusg: as in, you'd want it to do the :m +... for you automatically? |
| 2025-10-15 10:50:58 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 2025-10-15 10:50:58 | <[exa]> | there was a shortcut for that somewhere |
| 2025-10-15 10:52:03 | <titusg> | [exa]: yes |
| 2025-10-15 10:53:16 | <titusg> | It has always bugged me that it isn't default behaviour. Not sure why else you'd be starting cabal repl. |
| 2025-10-15 10:54:08 | × | koz quits (~koz@121.99.240.58) (Ping timeout: 256 seconds) |
| 2025-10-15 10:58:05 | × | halloy7365 quits (~halloy736@2404:4400:5446:4e00:b445:d572:a953:7834) (Quit: halloy7365) |
| 2025-10-15 10:58:27 | → | koz joins (~koz@121.99.240.58) |
| 2025-10-15 11:01:42 | → | comerijn joins (~merijn@77.242.116.146) |
| 2025-10-15 11:01:59 | <[exa]> | titusg: I'm usually doing it to try some stuff with the package environment, not necessarily the modules |
| 2025-10-15 11:02:19 | <[exa]> | (also the modules may conflict in the namespace) |
| 2025-10-15 11:02:39 | <[exa]> | anyway there's a way to do that iirc, I saw it somewhere |
| 2025-10-15 11:03:41 | <[exa]> | maybe something like this? https://discourse.haskell.org/t/define-custom-command-for-a-cabal-repl-session/12088/2 |
| 2025-10-15 11:04:02 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 260 seconds) |
| 2025-10-15 11:04:09 | <titusg> | fair enough. I'm usually just wanting to play around with the code I'm working on... |
| 2025-10-15 11:05:25 | <titusg> | thx for finding that, I'll have a play :) |
| 2025-10-15 11:06:37 | <[exa]> | yeah I never used it but looks like you can just stuff custom commands to a local .ghci |
| 2025-10-15 11:09:04 | → | xff0x joins (~xff0x@2405:6580:b080:900:3bfc:a749:138a:b4ac) |
| 2025-10-15 11:14:01 | <tomsmeding> | titusg: cabal repl loads the first module listed in the cabal file for that component |
| 2025-10-15 11:14:48 | <tomsmeding> | also, in case it's helpful: try `:set prompt "%s> "` to always show what modules are currently in scope |
| 2025-10-15 11:15:00 | <tomsmeding> | in GHC 9.0 the default changed away from that and I hate it |
| 2025-10-15 11:15:26 | <tomsmeding> | also on :r it re-adds that first-module-in-the-component back into the scope list |
| 2025-10-15 11:16:13 | <tomsmeding> | (I actually have `:set prompt "\ESC[1m\STX%s>\ESC[0m\STX "` to make the prompt more visible, too) |
| 2025-10-15 11:22:12 | → | CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) |
| 2025-10-15 11:24:31 | <dminuoso> | tomsmeding: Regarding ApplicativeDo, Im not sure how `bar x` would be an issue - function application by itself is not forbidden inside ApplicativeDo. |
| 2025-10-15 11:24:47 | <tomsmeding> | dminuoso: well the x is bound in the outer do |
| 2025-10-15 11:24:52 | <dminuoso> | So? |
| 2025-10-15 11:25:00 | <tomsmeding> | ... fair point |
| 2025-10-15 11:25:18 | <tomsmeding> | (\x -> ...) <$> foo |
| 2025-10-15 11:25:48 | <tomsmeding> | if the 'return y' also referenced x, then we'd be in trouble |
| 2025-10-15 11:25:56 | <tomsmeding> | I think? |
| 2025-10-15 11:26:03 | <tomsmeding> | yeah |
| 2025-10-15 11:26:05 | <dminuoso> | Even then, I dont see why |
| 2025-10-15 11:26:31 | <dminuoso> | I mean it may be that there is a very naive heuristic that just looks at x and sees that its bound in do-notation. |
| 2025-10-15 11:26:47 | <dminuoso> | But because its the outer do-notation, as far as the inner do-notation is concerned is just some variable. |
| 2025-10-15 11:27:04 | <tomsmeding> | do { x <- foo; y <- f x; return (g x y) } |
| 2025-10-15 11:27:10 | <tomsmeding> | how would you write that in applicative combinators? |
| 2025-10-15 11:27:26 | <dminuoso> | tomsmeding: That's not related. |
| 2025-10-15 11:27:35 | <dminuoso> | Lets ignore the outer do notation for a second. |
| 2025-10-15 11:27:38 | × | tromp quits (~textual@2001:1c00:3487:1b00:cdf:654a:2a7f:261) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-10-15 11:27:51 | <tomsmeding> | I was assuming that the ApplicativeDo is supposed to apply to the outer do |
| 2025-10-15 11:28:13 | <dminuoso> | tomsmeding: Given the mention of runA I think they wanted it in the inner one. |
| 2025-10-15 11:28:17 | <tomsmeding> | _right_ |
| 2025-10-15 11:28:23 | <tomsmeding> | okay that's weird |
| 2025-10-15 11:28:46 | <dminuoso> | tomsmeding: But perfectly in line with how frequently ApplicativeDo fails. Not that it should. |
| 2025-10-15 11:29:26 | <dminuoso> | Sometimes I wonder whether a `doA` with an explicit error instead of silent monad degradation would have been better. |
| 2025-10-15 11:30:03 | <tomsmeding> | works for me though |
| 2025-10-15 11:30:03 | <dminuoso> | An example like this should work more easily |
| 2025-10-15 11:30:19 | <tomsmeding> | https://play.haskell.org/saved/9myEpOls |
| 2025-10-15 11:30:21 | <dminuoso> | tomsmeding: Who knows, I've experienced so many ApplicativeDo -> Monad degradations in the past. |
| 2025-10-15 11:30:39 | <tomsmeding> | I never use ApplicativeDo |
| 2025-10-15 11:30:55 | × | sajenim quits (~sajenim@user/sajenim) (Ping timeout: 265 seconds) |
| 2025-10-15 11:31:08 | <dminuoso> | I usually use it for optparse-applicative. |
| 2025-10-15 11:32:17 | × | chromoblob quits (~chromoblo@user/chromob1ot1c) (Read error: Connection reset by peer) |
| 2025-10-15 11:32:37 | → | chromoblob joins (~chromoblo@user/chromob1ot1c) |
| 2025-10-15 11:34:20 | <dminuoso> | (And I still have optparse-selective on my todo stack) |
| 2025-10-15 11:35:38 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 2025-10-15 11:36:42 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 2025-10-15 11:36:58 | Lord_of_Life_ | is now known as Lord_of_Life |
| 2025-10-15 11:37:12 | <tomsmeding> | ah right, makes sense |
| 2025-10-15 11:42:53 | → | fp1 joins (~Thunderbi@wireless-86-50-141-225.open.aalto.fi) |
| 2025-10-15 11:43:06 | × | chromoblob quits (~chromoblo@user/chromob1ot1c) (Ping timeout: 252 seconds) |
| 2025-10-15 11:43:24 | → | chromoblob joins (~chromoblo@user/chromob1ot1c) |
| 2025-10-15 11:44:45 | × | fp quits (~Thunderbi@2001:708:20:1406::10c5) (Ping timeout: 252 seconds) |
| 2025-10-15 11:44:46 | fp1 | is now known as fp |
| 2025-10-15 11:45:27 | × | trickard_ quits (~trickard@cpe-53-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-10-15 11:45:40 | → | trickard_ joins (~trickard@cpe-53-98-47-163.wireline.com.au) |
| 2025-10-15 11:46:18 | → | inline joins (~inline@ip-178-202-059-161.um47.pools.vodafone-ip.de) |
| 2025-10-15 11:47:50 | → | weary-traveler joins (~user@user/user363627) |
| 2025-10-15 11:49:26 | → | tromp joins (~textual@2001:1c00:3487:1b00:cdf:654a:2a7f:261) |
| 2025-10-15 11:50:21 | × | chromoblob quits (~chromoblo@user/chromob1ot1c) (Read error: Connection reset by peer) |
| 2025-10-15 11:50:55 | → | chromoblob joins (~chromoblo@user/chromob1ot1c) |
| 2025-10-15 11:51:54 | × | koz quits (~koz@121.99.240.58) (Ping timeout: 252 seconds) |
| 2025-10-15 11:55:22 | → | koz joins (~koz@121.99.240.58) |
| 2025-10-15 11:57:56 | → | trickard___ joins (~trickard@cpe-62-98-47-163.wireline.com.au) |
| 2025-10-15 11:58:23 | <[exa]> | dminuoso: re optparse-selective, that would be a rewrite of optparse? |
| 2025-10-15 11:58:31 | → | m1dnight joins (~m1dnight@d8D861A17.access.telenet.be) |
| 2025-10-15 11:58:37 | × | trickard_ quits (~trickard@cpe-53-98-47-163.wireline.com.au) (Ping timeout: 246 seconds) |
| 2025-10-15 11:58:51 | <[exa]> | dminuoso: (perhaps related: https://github.com/pcapriotti/optparse-applicative/pull/505 ) |
| 2025-10-15 11:58:59 | trickard___ | is now known as trickard |
| 2025-10-15 12:03:10 | × | comerijn quits (~merijn@77.242.116.146) (Ping timeout: 246 seconds) |
| 2025-10-15 12:08:41 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-10-15 12:13:54 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 252 seconds) |
| 2025-10-15 12:15:05 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-10-15 12:18:16 | → | MelodyOwO joins (~MelodyOwO@user/MelodyOwO) |
| 2025-10-15 12:19:24 | × | fp quits (~Thunderbi@wireless-86-50-141-225.open.aalto.fi) (Ping timeout: 252 seconds) |
| 2025-10-15 12:21:08 | <dminuoso> | [exa]: Yes, some years ago I started a huge rewrite for no practical reason other than idealism. |
| 2025-10-15 12:21:21 | <dminuoso> | But because it was just idealism there was no inherent need that kept me going. |
| 2025-10-15 12:25:21 | × | vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 256 seconds) |
| 2025-10-15 12:42:24 | <kuribas`> | I use applicativeDo for records. |
| 2025-10-15 12:42:45 | <kuribas`> | Much more readable and robust than positional. |
| 2025-10-15 12:43:20 | <kuribas`> | do foo <- fooExpr; bar <- barExpr; ... ; pure (MyRecord {..}) |
| 2025-10-15 12:46:54 | × | peutri quits (~peutri@bobo.desast.re) (Ping timeout: 252 seconds) |
All times are in UTC.