Logs: liberachat/#haskell
| 2026-04-22 09:29:42 | × | davl quits (~davl@207.154.228.18) (Ping timeout: 255 seconds) |
| 2026-04-22 09:31:13 | × | tnt1 quits (~Thunderbi@user/tnt1) (Remote host closed the connection) |
| 2026-04-22 09:43:33 | → | misterfish joins (~misterfis@84.53.85.146) |
| 2026-04-22 09:47:30 | → | acidjnk_new3 joins (~acidjnk@p200300d6e700e5836dc6d0caa2ab8c45.dip0.t-ipconnect.de) |
| 2026-04-22 09:48:35 | → | tnt1 joins (~Thunderbi@user/tnt1) |
| 2026-04-22 09:49:04 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 245 seconds) |
| 2026-04-22 09:50:42 | × | acidjnk_new quits (~acidjnk@p200300d6e700e575659a3cc58dc6913c.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 2026-04-22 09:53:30 | → | arandombit joins (~arandombi@user/arandombit) |
| 2026-04-22 09:53:34 | × | arandombit quits (~arandombi@user/arandombit) (Remote host closed the connection) |
| 2026-04-22 10:02:51 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 2026-04-22 10:12:27 | × | xff0x quits (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 255 seconds) |
| 2026-04-22 10:21:45 | × | puke quits (~puke@user/puke) (Remote host closed the connection) |
| 2026-04-22 10:22:25 | → | nmeum_ joins (~nmeum@barium.8pit.net) |
| 2026-04-22 10:24:47 | <nmeum_> | I have a question regarding Control.Monad.Catch: I do exception handling via `catch` in the context of a stateful monad `m`, in the exception handler `(e -> m a)` I want to access information about the state of my monad in which the exception occured. however, the exception handler action is executed in the state of the `catch` caller. how do access the error `m` state? |
| 2026-04-22 10:24:50 | nmeum_ | is now known as nmeum |
| 2026-04-22 10:43:11 | <mauke> | ski: and don't forget YAML |
| 2026-04-22 10:47:16 | × | tv quits (~tv@user/tv) (Read error: Connection reset by peer) |
| 2026-04-22 10:48:50 | × | pfc quits (~pfc@user/pfc) (Ping timeout: 248 seconds) |
| 2026-04-22 10:50:15 | × | divlamir quits (~divlamir@user/divlamir) (Read error: Connection reset by peer) |
| 2026-04-22 10:50:32 | → | divlamir joins (~divlamir@user/divlamir) |
| 2026-04-22 10:57:43 | <merijn> | nmeum: You do not |
| 2026-04-22 10:58:10 | → | puke joins (~puke@user/puke) |
| 2026-04-22 10:58:24 | <merijn> | nmeum: Or rather, in that scenario you probably just want a Reader of an IORef/MVar to access the state |
| 2026-04-22 11:00:03 | <nmeum> | hm, that would presuppose changing the entire internal state representation of my monad. I think I would rather throw a custom exception which also includes the state or something along those lines then |
| 2026-04-22 11:02:14 | <merijn> | nmeum: The problem is that catch is effectively unwrapping/rewrapping the stack, and there's no general way to make e.g. `StateT` handler that |
| 2026-04-22 11:04:00 | <merijn> | nmeum: i.e. imagine `StateT s (EitherT e IO) a`, it ends up doing `runStateT` + `runEitherT` to turn it into `IO (Either e (s, a))` and then rewrapping that. But if the EitherT (or MaybeT) early aborts you don't get a state to return. |
| 2026-04-22 11:04:21 | <nmeum> | yea, makes sense |
| 2026-04-22 11:15:33 | → | tv joins (~tv@user/tv) |
| 2026-04-22 11:17:39 | × | craunts795335385 quits (~craunts@152.32.100.66) (Quit: The Lounge - https://thelounge.chat) |
| 2026-04-22 11:19:22 | → | xff0x joins (~xff0x@2405:6580:b080:900:a57a:c3e:71fc:8409) |
| 2026-04-22 11:21:08 | → | craunts795335385 joins (~craunts@152.32.100.66) |
| 2026-04-22 11:24:36 | <ski> | mm, YAML is unrelated |
| 2026-04-22 11:24:53 | <ski> | @unmtl StateT s (EitherT e IO) a |
| 2026-04-22 11:24:53 | <lambdabot> | s -> EitherT e IO (a, s) |
| 2026-04-22 11:25:07 | <ski> | @unmtl StateT s (ExceptT e IO) a |
| 2026-04-22 11:25:07 | <lambdabot> | s -> IO (Either e (a, s)) |
| 2026-04-22 11:25:38 | <ski> | @unmtl ExceptT e (StateT s IO) a |
| 2026-04-22 11:25:38 | <lambdabot> | s -> IO (Either e a, s) |
| 2026-04-22 11:26:28 | <ski> | @unmtl StateT s (MaybeT IO) a |
| 2026-04-22 11:26:28 | <lambdabot> | s -> IO (Maybe (a, s)) |
| 2026-04-22 11:26:35 | <ski> | @unmtl MaybeT (StateT s IO) a |
| 2026-04-22 11:26:36 | <lambdabot> | s -> IO (Maybe a, s) |
| 2026-04-22 11:29:55 | × | confusedalex quits (~confuseda@user/confusedalex) (Remote host closed the connection) |
All times are in UTC.