Logs: liberachat/#haskell
| 2025-11-01 12:07:32 | → | annamalai joins (~annamalai@2409:4042:2595:bd4d::195e:70b1) |
| 2025-11-01 12:07:46 | × | annamalai quits (~annamalai@2409:4042:2595:bd4d::195e:70b1) (Remote host closed the connection) |
| 2025-11-01 12:08:16 | → | annamalai joins (~annamalai@157.32.129.251) |
| 2025-11-01 12:10:04 | × | Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 256 seconds) |
| 2025-11-01 12:11:25 | × | deptype quits (~deptype@2406:b400:3a:73c2:7579:76fe:bca4:23ab) (Remote host closed the connection) |
| 2025-11-01 12:11:44 | → | deptype joins (~deptype@2406:b400:3a:73c2:3e27:c5fb:2b6a:c31c) |
| 2025-11-01 12:15:29 | × | Googulator29 quits (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-01 12:15:37 | → | Googulator4 joins (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) |
| 2025-11-01 12:20:48 | → | Googulator7 joins (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) |
| 2025-11-01 12:20:48 | × | Googulator4 quits (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-01 12:25:31 | → | Zemy_ joins (~Zemy@2600:100c:b0a4:2639:4c01:a2ff:fe33:9bc) |
| 2025-11-01 12:25:32 | × | Zemy quits (~Zemy@72.178.108.235) (Read error: Connection reset by peer) |
| 2025-11-01 12:26:04 | → | Zemy joins (~Zemy@72.178.108.235) |
| 2025-11-01 12:26:14 | ghoulpine | is now known as vulpine |
| 2025-11-01 12:27:16 | → | ttybitnik joins (~ttybitnik@user/wolper) |
| 2025-11-01 12:27:26 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 2025-11-01 12:29:54 | × | Zemy_ quits (~Zemy@2600:100c:b0a4:2639:4c01:a2ff:fe33:9bc) (Ping timeout: 256 seconds) |
| 2025-11-01 12:31:57 | × | deptype quits (~deptype@2406:b400:3a:73c2:3e27:c5fb:2b6a:c31c) (Remote host closed the connection) |
| 2025-11-01 12:32:15 | → | deptype joins (~deptype@2406:b400:3a:73c2:6762:5241:22a5:600b) |
| 2025-11-01 12:38:05 | → | rvalue joins (~rvalue@about/hackers/rvalue) |
| 2025-11-01 12:39:31 | → | CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) |
| 2025-11-01 12:44:47 | × | Nachtgespenst quits (~user@user/siracusa) (Quit: Bye!) |
| 2025-11-01 12:46:00 | → | Googulator65 joins (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) |
| 2025-11-01 12:46:24 | × | Googulator7 quits (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-01 12:49:04 | → | Zemy_ joins (~Zemy@2600:100c:b0a4:2639:f8b1:8ff:fe9d:828a) |
| 2025-11-01 12:52:00 | × | deptype quits (~deptype@2406:b400:3a:73c2:6762:5241:22a5:600b) (Remote host closed the connection) |
| 2025-11-01 12:52:19 | → | deptype joins (~deptype@2406:b400:3a:73c2:65b0:5f93:a932:9d2) |
| 2025-11-01 12:53:07 | × | Zemy quits (~Zemy@72.178.108.235) (Ping timeout: 256 seconds) |
| 2025-11-01 12:58:39 | × | tromp quits (~textual@2001:1c00:3487:1b00:dc25:ce25:d6de:4df2) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-11-01 13:00:11 | × | humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection) |
| 2025-11-01 13:05:31 | × | Googulator65 quits (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-01 13:05:41 | → | Googulator65 joins (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) |
| 2025-11-01 13:07:33 | trickard_ | is now known as trickard |
| 2025-11-01 13:08:42 | → | tromp joins (~textual@2001:1c00:3487:1b00:dc25:ce25:d6de:4df2) |
| 2025-11-01 13:11:30 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 2025-11-01 13:12:32 | × | deptype quits (~deptype@2406:b400:3a:73c2:65b0:5f93:a932:9d2) (Remote host closed the connection) |
| 2025-11-01 13:12:45 | → | humasect joins (~humasect@dyn-192-249-132-90.nexicom.net) |
| 2025-11-01 13:12:49 | → | deptype joins (~deptype@2406:b400:3a:73c2:5a38:2057:fcee:3951) |
| 2025-11-01 13:16:10 | → | mreh joins (~matthew@host86-146-25-125.range86-146.btcentralplus.com) |
| 2025-11-01 13:16:18 | → | Zemy joins (~Zemy@mobile-107-80-206-4.mycingular.net) |
| 2025-11-01 13:16:27 | × | humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Client Quit) |
| 2025-11-01 13:17:46 | <mreh> | is there an extension to tell GHC to derive an instance via the class defaults rather than somethinge else, like StandaloneNewtypeDeriving |
| 2025-11-01 13:17:57 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 2025-11-01 13:18:25 | <mreh> | I've got a newtype over ReaderT, but I want to derive a generic MonadReader instance |
| 2025-11-01 13:18:38 | × | Zemy_ quits (~Zemy@2600:100c:b0a4:2639:f8b1:8ff:fe9d:828a) (Ping timeout: 256 seconds) |
| 2025-11-01 13:20:07 | <tomsmeding> | mreh: DeriveAnyClass? |
| 2025-11-01 13:20:17 | <tomsmeding> | though I would be more explicit and write a separate instance declaration without a body |
| 2025-11-01 13:20:39 | → | Googulator29 joins (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) |
| 2025-11-01 13:20:41 | × | Googulator65 quits (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-01 13:21:02 | <mreh> | tomsmeding: yeah, and using DerivingStrategies? |
| 2025-11-01 13:21:17 | <tomsmeding> | DerivingVia specifically, I guess you mean? |
| 2025-11-01 13:21:28 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2025-11-01 13:21:30 | <tomsmeding> | that's just a steerable GeneralizedNewtypeDeriving |
| 2025-11-01 13:21:41 | <tomsmeding> | and though I'm not 100% clear on what you want, it sounds like you don't want that |
| 2025-11-01 13:22:27 | <mreh> | I think I'm probably confused |
| 2025-11-01 13:22:42 | <[exa]> | mreh: perhaps what's the higher-level goal? |
| 2025-11-01 13:23:27 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 2025-11-01 13:24:42 | <[exa]> | (my understanding now is that you want "undo" the specifics added by that newtype of yours?) |
| 2025-11-01 13:24:54 | <mreh> | I was thinking there's an instance for MonadReader for ReaderT other than the obvious. I'm wrapping ReaderT in a newtype to create a new monad transformer, but I want a MonadReader instance where MonadReadr m => t m a. |
| 2025-11-01 13:25:37 | <mreh> | where t is my transformer |
| 2025-11-01 13:25:49 | → | Googulator28 joins (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) |
| 2025-11-01 13:26:09 | <mreh> | is this making any sense? |
| 2025-11-01 13:26:17 | × | Googulator29 quits (~Googulato@2a01-036d-0106-03fa-d858-cbac-c845-1acf.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-01 13:26:45 | → | Zemy_ joins (~Zemy@12.50.228.210) |
| 2025-11-01 13:27:19 | <tomsmeding> | please post your type and the instance that you want to generate |
| 2025-11-01 13:27:26 | <tomsmeding> | because it doesn't to me :P |
| 2025-11-01 13:28:08 | <[exa]> | yeah it looks like this should be obviously Just Working, so there's going to be something to realize over the code |
| 2025-11-01 13:28:31 | <mreh> | newtype MemoT m a = MemoT { unMemoT :: ReaderT e m a } -- roughly |
| 2025-11-01 13:29:25 | <mreh> | instance MonadReader e m => MonadReader e (MemoT m) -- instance I want |
| 2025-11-01 13:29:35 | <mreh> | I'm getting over a cold, so I might be typing gibberish |
| 2025-11-01 13:29:39 | <tomsmeding> | I see |
| 2025-11-01 13:29:58 | × | Zemy quits (~Zemy@mobile-107-80-206-4.mycingular.net) (Ping timeout: 256 seconds) |
| 2025-11-01 13:30:08 | <tomsmeding> | I don't think there's an extension that'll get you that automatically |
| 2025-11-01 13:30:59 | <[exa]> | this could work via the wraps&unwraps from lenses |
| 2025-11-01 13:31:04 | <mreh> | well, it's MonadTrans, so it should be easy enough |
| 2025-11-01 13:31:06 | <tomsmeding> | if you need to do this pattern many times, you could write a newtype that has this particular behaviour and use that with DerivingVia |
| 2025-11-01 13:31:55 | <mreh> | interesting |
| 2025-11-01 13:32:02 | <tomsmeding> | but for a one-off, that's pointless |
| 2025-11-01 13:32:07 | × | deptype quits (~deptype@2406:b400:3a:73c2:5a38:2057:fcee:3951) (Remote host closed the connection) |
| 2025-11-01 13:32:27 | → | deptype joins (~deptype@2406:b400:3a:73c2:1eab:f9cf:6f5b:fc2) |
| 2025-11-01 13:33:04 | <mreh> | I just got confused, if it was wrapping any other transformer it would be easy via GeneralisedNewtypeDeriving |
| 2025-11-01 13:33:29 | <[exa]> | mreh: if I got it right you essentially need the deriving thing to only realize that your MemoT is a no-op wrapper, which sounds very similar to me like what is used in `ala` here: https://hackage-content.haskell.org/package/lens-5.3.5/docs/Control-Lens-Combinators.html#v:ala |
| 2025-11-01 13:33:44 | <[exa]> | so maybe you could do a generic instance such as |
| 2025-11-01 13:33:48 | <tomsmeding> | mreh: it would be, but only if this other transformer implements MonadReader in the way you want |
| 2025-11-01 13:33:55 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-01 13:33:57 | <tomsmeding> | which indeed is all other transformers in mtl, because of how mtl is designed |
| 2025-11-01 13:34:00 | <mreh> | [exa] interesting |
| 2025-11-01 13:34:04 | <mreh> | tomsmeding: correct |
| 2025-11-01 13:34:34 | <mreh> | I am not very much up to speed with everything in lens |
| 2025-11-01 13:34:40 | <tomsmeding> | [exa]: mreh wants the MonadReader instance on MemoT to use the MonadReader instance on m, "skipping" the one from ReaderT |
| 2025-11-01 13:34:52 | <tomsmeding> | I don't see how any lens tricks are going to make this easier |
| 2025-11-01 13:35:05 | <tomsmeding> | the MonadReader methods are so trivial you should just write them by hand, and in any case there's `lift` |
| 2025-11-01 13:35:20 | <mreh> | yeah, I could have probably done it by now! |
| 2025-11-01 13:35:21 | <mreh> | thanks |
| 2025-11-01 13:35:23 | <[exa]> | instance (MonadReader e m, Rewrapping m m') => MonadReader e m' ... |
| 2025-11-01 13:35:34 | <tomsmeding> | mreh: it's useful to think about other ways of achieving the same thing sometimes :) |
| 2025-11-01 13:35:39 | <[exa]> | tomsmeding: actually these are not lenses per se, just one of the 49529425793845 useful things packed together in the lens library |
| 2025-11-01 13:35:45 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 244 seconds) |
| 2025-11-01 13:36:20 | <mreh> | I sometimes wonder if ekmett is some kind of superintelligence |
| 2025-11-01 13:36:31 | <[exa]> | type-level intelligence |
All times are in UTC.