Newest at the top
2025-03-13 04:58:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-03-13 04:58:02 +0100 | izzyfalco | (~jake_pers@user/izzyfalco) (Ping timeout: 268 seconds) |
2025-03-13 04:56:48 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-03-13 04:56:33 +0100 | <euouae> | I misread it because I saw "MonadState" followed by "ParsecT" and I didn't realize what I was reading |
2025-03-13 04:55:53 +0100 | <euouae> | oh wait, right. thank you jackdk. |
2025-03-13 04:55:29 +0100 | <jackdk> | euouae: And no, you have `ParsecT Void Text (St.State Int)` which matches the instance `MonadState (ParsecT e s m)` with `e ~ Void`, `s ~ Text`, `m ~ St.State Int`, and this instance is usable because you have the instances `Stream s` and `MonadState Int (St.StateT Int Identity)` (expanding the alias for `St.State`) |
2025-03-13 04:54:56 +0100 | <euouae> | somewhat frustrating to always have to run to haddock online |
2025-03-13 04:53:34 +0100 | <c_wraith> | so if nothing you've imported re-exports the class, the instance won't be listed |
2025-03-13 04:53:22 +0100 | izzyfalco | (~jake_pers@user/izzyfalco) izzyfalco |
2025-03-13 04:53:08 +0100 | <jackdk> | euouae: I had to `:m + Control.Monad.State` to see it |
2025-03-13 04:52:58 +0100 | <c_wraith> | yeah, ghci only shows you instances for classes that it has in scope |
2025-03-13 04:52:55 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 04:52:18 +0100 | <euouae> | jackdk: isn't that inverse of what I have in terms of the monadic stack? |
2025-03-13 04:52:11 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-13 04:51:11 +0100 | <euouae> | Why is it not visible in GHCi? Is it because I haven't imported these packages? |
2025-03-13 04:50:37 +0100 | <euouae> | Yeah you're right. It was not visible in GHCi |
2025-03-13 04:50:09 +0100 | <jackdk> | Specifically, it's the instance `(Stream s, MonadState st m) => MonadState st (ParsecT e s m)`, which should let you use `modify` etc from `mtl` |
2025-03-13 04:49:39 +0100 | <c_wraith> | https://hackage.haskell.org/package/megaparsec-9.7.0/docs/Text-Megaparsec.html#t:ParsecT look at that huge instance list |
2025-03-13 04:49:31 +0100 | <c_wraith> | It's visible in the haddocks |
2025-03-13 04:48:41 +0100 | <euouae> | Maybe an instance of MonadTrans from transformers? |
2025-03-13 04:48:32 +0100 | <euouae> | I want to ask if there is such an operation already defined in megaparsec? I.e. what's a good way to discover such lifts? Would this info be visible in `:i ParsecT` at the instance declarations? |
2025-03-13 04:47:58 +0100 | <euouae> | I'm using megaparsec and I have a `ParsecT Void Text (St.State Int) Text`. I want to use `modify (+1)` inside the do block. I know I have to lift it. |
2025-03-13 04:47:06 +0100 | <euouae> | Hello |
2025-03-13 04:47:03 +0100 | euouae | (~euouae@user/euouae) euouae |
2025-03-13 04:42:03 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
2025-03-13 04:37:31 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 04:36:26 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) (Ping timeout: 252 seconds) |
2025-03-13 04:35:29 +0100 | TheCoffeMaker_ | (~TheCoffeM@186.136.173.70) |
2025-03-13 04:26:14 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-03-13 04:19:28 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 04:15:09 +0100 | yegorc | (~yegorc@user/yegorc) (Ping timeout: 252 seconds) |
2025-03-13 04:10:46 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-03-13 04:08:34 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-03-13 04:06:27 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-13 04:04:04 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 03:55:24 +0100 | j1n37 | (~j1n37@user/j1n37) j1n37 |
2025-03-13 03:54:38 +0100 | j1n37 | (~j1n37@user/j1n37) (Ping timeout: 252 seconds) |
2025-03-13 03:53:54 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-03-13 03:48:44 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 03:44:34 +0100 | messewix | (~jmc@user/messewix) (Remote host closed the connection) |
2025-03-13 03:44:29 +0100 | messewix | (~jmc@user/messewix) messewix |
2025-03-13 03:44:11 +0100 | messewix | (~jmc@user/messewix) (Quit: Konversation terminated!) |
2025-03-13 03:41:42 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 265 seconds) |
2025-03-13 03:38:19 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
2025-03-13 03:33:20 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 03:24:45 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-03-13 03:24:01 +0100 | messewix | (~jmc@user/messewix) messewix |
2025-03-13 03:22:13 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-03-13 03:20:43 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-13 03:17:58 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |