2025/05/01

Newest at the top

2025-05-01 21:56:00 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-05-01 21:55:02 +0200traxex(traxex@user/traxex) traxex
2025-05-01 21:54:16 +0200 <dutchie> nice, https://paste.tomsmeding.com/lYtaNeCf typechecks
2025-05-01 21:52:31 +0200j1n37-(~j1n37@user/j1n37) j1n37
2025-05-01 21:52:29 +0200j1n37(~j1n37@user/j1n37) (Ping timeout: 245 seconds)
2025-05-01 21:52:28 +0200 <lambdabot> Applicative m => Maybe a -> MaybeT m a
2025-05-01 21:52:27 +0200 <EvanR> :t MaybeT . pure
2025-05-01 21:51:12 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-05-01 21:51:10 +0200 <lambdabot> Defined.
2025-05-01 21:51:09 +0200 <tomsmeding> @let import Control.Monad.Trans.Maybe
2025-05-01 21:51:06 +0200 <lambdabot> Unknown command, try @list
2025-05-01 21:51:06 +0200 <tomsmeding> @import Control.Monad.Trans.Maybe
2025-05-01 21:50:47 +0200 <EvanR> lambdabooooooooooooooooot
2025-05-01 21:50:40 +0200 <lambdabot> • Perhaps you meant variable ‘maybe’ (imported from Data.Maybe)
2025-05-01 21:50:40 +0200 <lambdabot> • Data constructor not in scope: MaybeT :: f0 a -> c
2025-05-01 21:50:40 +0200 <lambdabot> error:
2025-05-01 21:50:39 +0200 <EvanR> :t MaybeT . pure
2025-05-01 21:50:21 +0200nitrix(~nitrix@user/meow/nitrix) (Quit: ZNC 1.9.1 - https://znc.in)
2025-05-01 21:49:35 +0200 <tomsmeding> (if you want Nothing to be an error)
2025-05-01 21:49:04 +0200 <mauke> MaybeT . pure
2025-05-01 21:48:56 +0200 <tomsmeding> oh, you're right
2025-05-01 21:48:44 +0200 <mauke> that looks like the wrong shape
2025-05-01 21:47:51 +0200 <lambdabot> (MonadTrans t, Monad m) => m a -> t m a
2025-05-01 21:47:50 +0200 <tomsmeding> :t Control.Monad.Trans.Class.lift
2025-05-01 21:47:04 +0200 <dutchie> now the annoying part is the non-monadic Map.lookup, heh
2025-05-01 21:46:54 +0200 <dutchie> right, yeah, I think I can put it together there
2025-05-01 21:45:02 +0200 <tomsmeding> (not quite always; there are more utility functions in Control.Monad.Trans.Maybe)
2025-05-01 21:44:33 +0200 <tomsmeding> just applying the MaybeT constructor is usually all wrapping that's required
2025-05-01 21:44:26 +0200 <mauke> wibble = MaybeT . ThirdParty.wibble
2025-05-01 21:44:11 +0200 <lambdabot> m (Maybe a) -> Control.Monad.Trans.Maybe.MaybeT m a
2025-05-01 21:44:11 +0200 <tomsmeding> :t Control.Monad.Trans.Maybe.MaybeT
2025-05-01 21:43:51 +0200 <lambdabot> • Perhaps you meant variable ‘maybe’ (imported from Data.Maybe)
2025-05-01 21:43:51 +0200 <lambdabot> • Data constructor not in scope: MaybeT
2025-05-01 21:43:51 +0200 <lambdabot> error:
2025-05-01 21:43:50 +0200 <tomsmeding> :t MaybeT
2025-05-01 21:43:28 +0200 <dutchie> hm
2025-05-01 21:43:21 +0200 <lambdabot> AppM (Maybe a)
2025-05-01 21:43:21 +0200 <tomsmeding> @unmtl MaybeT AppM a
2025-05-01 21:43:17 +0200 <dutchie> wibble/wobble come from 3rd party libs though so unless I can just wrap them that's not helpful
2025-05-01 21:42:40 +0200 <mauke> yes, that's MaybeT AppM a
2025-05-01 21:42:28 +0200 <dutchie> it feels like morally i should have a monad instance for AppM (Maybe a)
2025-05-01 21:41:33 +0200 <dutchie> I guess I should have called it mbaz rather than mfoo
2025-05-01 21:40:32 +0200 <mauke> is there a MaybeT?
2025-05-01 21:40:15 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-05-01 21:39:30 +0200 <EvanR> wibble takes a Bar not a Maybe
2025-05-01 21:37:54 +0200euleritian(~euleritia@77.23.248.47)
2025-05-01 21:37:37 +0200euleritian(~euleritia@dynamic-176-006-130-078.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2025-05-01 21:37:35 +0200 <dutchie> I can't figure out how to handle threading the Nothing/AppM monad through each other
2025-05-01 21:36:29 +0200ljdarj(~Thunderbi@user/ljdarj) ljdarj
2025-05-01 21:36:20 +0200 <dutchie> surely there is a better way to write this: https://paste.tomsmeding.com/zzpDyNYM