2025-03-13 00:03:24 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-03-13 00:03:49 +0100 | tabaqui | (~root@167.71.80.236) (Quit: WeeChat 4.5.1) |
2025-03-13 00:04:38 +0100 | tabaqui1 | (~root@87.200.129.102) (Quit: WeeChat 4.5.1) |
2025-03-13 00:04:42 +0100 | tabaqui | (~root@167.71.80.236) tabaqui |
2025-03-13 00:11:34 +0100 | tabaqui1 | (~root@87.200.129.102) tabaqui |
2025-03-13 00:14:01 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 00:15:53 +0100 | tabaqui1 | (~root@87.200.129.102) (Client Quit) |
2025-03-13 00:17:26 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-13 00:17:37 +0100 | tabaqui1 | (~root@167.71.80.236) tabaqui |
2025-03-13 00:18:16 +0100 | tabaqui | (~root@167.71.80.236) (Quit: WeeChat 4.5.1) |
2025-03-13 00:18:24 +0100 | tuxpaint | (~a@2600:3c06::f03c:93ff:fea6:ef0e) (Ping timeout: 252 seconds) |
2025-03-13 00:18:40 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-03-13 00:21:36 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-03-13 00:29:23 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 00:31:33 +0100 | tabaqui | (~root@167.71.80.236) tabaqui |
2025-03-13 00:34:06 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-03-13 00:36:50 +0100 | tabaqui1 | (~root@167.71.80.236) (Quit: WeeChat 4.5.1) |
2025-03-13 00:36:52 +0100 | tabaqui | (~root@167.71.80.236) (Quit: WeeChat 4.5.1) |
2025-03-13 00:38:11 +0100 | tabaqui | (~tabaqui@167.71.80.236) tabaqui |
2025-03-13 00:38:51 +0100 | tabaqui1 | (~root@167.71.80.236) tabaqui |
2025-03-13 00:40:39 +0100 | tabaqui1 | (~root@167.71.80.236) (Client Quit) |
2025-03-13 00:40:53 +0100 | tabaqui1 | (~root@167.71.80.236) tabaqui |
2025-03-13 00:41:02 +0100 | <Leary> | Noinia: `Fold` does a silly thing where it quantifies over `f` both `Functor` and `Contravariant`, hence restricting to `f` phantom in `s`. The role system doesn't understand this, however; `coerce` alone won't work, but you can take solace in the fact that `fmap`/`contramap` will be trivial at runtime. |
2025-03-13 00:43:04 +0100 | tabaqui1 | (~root@167.71.80.236) (Client Quit) |
2025-03-13 00:44:39 +0100 | <jackdk> | Noinia: is https://hackage.haskell.org/package/base-4.21.0.0/docs/Data-Functor-Contravariant.html#v:phantom any use to you here? |
2025-03-13 00:44:46 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 00:45:27 +0100 | <jackdk> | Ah, `phantom` is still implemented as `() <$ x $< ()`. I had hoped it would be an unsafeCoerce in a wrapper |
2025-03-13 00:45:30 +0100 | tabaqui1 | (~root@167.71.80.236) tabaqui |
2025-03-13 00:46:19 +0100 | tabaqui1 | (~root@167.71.80.236) (Client Quit) |
2025-03-13 00:47:18 +0100 | tabaqui1 | (~root@167.71.80.236) tabaqui |
2025-03-13 00:49:06 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-03-13 00:58:07 +0100 | tusko | (uid478376@user/tusko) (Quit: Connection closed for inactivity) |
2025-03-13 01:00:09 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 01:02:43 +0100 | tuxpaint | (~a@2600:3c06::f03c:93ff:fea6:ef0e) |
2025-03-13 01:03:39 +0100 | ljdarj1 | (~Thunderbi@user/ljdarj) ljdarj |
2025-03-13 01:03:50 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-13 01:06:04 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 265 seconds) |
2025-03-13 01:06:04 +0100 | ljdarj1 | ljdarj |
2025-03-13 01:07:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
2025-03-13 01:08:06 +0100 | ystael | (~ystael@user/ystael) ystael |
2025-03-13 01:08:07 +0100 | <jackdk> | Noinia: Have you considered `coerceFold theFold = coerced . theFold`? `Control.Lens.Iso.coerced` uses the `.#` stuff from `Data.Profunctor.Unsafe` which should be zero-cost |
2025-03-13 01:08:09 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-03-13 01:09:04 +0100 | <jackdk> | (or at least very cheap - I don't quite know how it all works, but IIRC edwardk considered .# and #. very important, at least one point) |
2025-03-13 01:11:22 +0100 | xkuru | (~xkuru@user/xkuru) (Quit: Unvirtualizing) |
2025-03-13 01:11:40 +0100 | xkuru | (~xkuru@user/xkuru) xkuru |
2025-03-13 01:13:52 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
2025-03-13 01:18:11 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 01:20:51 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-03-13 01:22:45 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-03-13 01:23:34 +0100 | Square | (~Square@user/square) (Ping timeout: 252 seconds) |
2025-03-13 01:27:11 +0100 | sprotte24 | (~sprotte24@p200300d16f4b7200116db6fce964005a.dip0.t-ipconnect.de) (Quit: Leaving) |
2025-03-13 01:32:53 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f52eca5d8b1f7f6f1d4.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
2025-03-13 01:33:33 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f85b10ad2147dd4d665.dip0.t-ipconnect.de) acidjnk |
2025-03-13 01:33:33 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 01:34:18 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2025-03-13 01:34:18 +0100 | ystael | (~ystael@user/ystael) (Ping timeout: 252 seconds) |
2025-03-13 01:37:48 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-03-13 01:37:55 +0100 | izzyfalco | (~jake_pers@user/izzyfalco) izzyfalco |
2025-03-13 01:48:55 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 01:49:34 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-13 01:53:37 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 248 seconds) |
2025-03-13 01:53:50 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds) |
2025-03-13 01:58:13 +0100 | Smiles | (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2025-03-13 01:58:28 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 02:02:48 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-03-13 02:04:48 +0100 | tabaqui | (~tabaqui@167.71.80.236) (Ping timeout: 276 seconds) |
2025-03-13 02:05:14 +0100 | xff0x | (~xff0x@2405:6580:b080:900:7a6d:e986:6f30:4a1b) (Ping timeout: 272 seconds) |
2025-03-13 02:06:24 +0100 | xkuru | (~xkuru@user/xkuru) (Quit: Unvirtualizing) |
2025-03-13 02:09:12 +0100 | mange | (~user@user/mange) mange |
2025-03-13 02:13:48 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 02:15:16 +0100 | izzyfalco | (~jake_pers@user/izzyfalco) (Ping timeout: 252 seconds) |
2025-03-13 02:15:46 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) JuanDaugherty |
2025-03-13 02:16:01 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2025-03-13 02:18:34 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
2025-03-13 02:26:26 +0100 | ethantwardy | (user@user/ethantwardy) (Quit: WeeChat 4.4.2) |
2025-03-13 02:28:09 +0100 | ethantwardy | (user@user/ethantwardy) ethantwardy |
2025-03-13 02:29:10 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 02:32:42 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2025-03-13 02:34:04 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-03-13 02:34:59 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-13 02:39:06 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-03-13 02:42:46 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 252 seconds) |
2025-03-13 02:43:36 +0100 | califax | (~califax@user/califx) califx |
2025-03-13 02:44:33 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 02:51:10 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-03-13 02:56:14 +0100 | xff0x | (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) |
2025-03-13 03:00:28 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) (Quit: praxis.meansofproduction.biz (juan@acm.org)) |
2025-03-13 03:02:36 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 03:07:13 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-03-13 03:17:58 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 03:20:43 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-13 03:22:13 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-03-13 03:24:01 +0100 | messewix | (~jmc@user/messewix) messewix |
2025-03-13 03:24:45 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-03-13 03:33:20 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 03:38:19 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
2025-03-13 03:41:42 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 265 seconds) |
2025-03-13 03:44:11 +0100 | messewix | (~jmc@user/messewix) (Quit: Konversation terminated!) |
2025-03-13 03:44:29 +0100 | messewix | (~jmc@user/messewix) messewix |
2025-03-13 03:44:34 +0100 | messewix | (~jmc@user/messewix) (Remote host closed the connection) |
2025-03-13 03:48:44 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 03:53:54 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-03-13 03:54:38 +0100 | j1n37 | (~j1n37@user/j1n37) (Ping timeout: 252 seconds) |
2025-03-13 03:55:24 +0100 | j1n37 | (~j1n37@user/j1n37) j1n37 |
2025-03-13 04:04:04 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 04:06:27 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-13 04:08:34 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-03-13 04:10:46 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-03-13 04:15:09 +0100 | yegorc | (~yegorc@user/yegorc) (Ping timeout: 252 seconds) |
2025-03-13 04:19:28 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 04:26:14 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-03-13 04:35:29 +0100 | TheCoffeMaker_ | (~TheCoffeM@186.136.173.70) |
2025-03-13 04:36:26 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) (Ping timeout: 252 seconds) |
2025-03-13 04:37:31 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 04:42:03 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
2025-03-13 04:47:03 +0100 | euouae | (~euouae@user/euouae) euouae |
2025-03-13 04:47:06 +0100 | <euouae> | Hello |
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: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:48:41 +0100 | <euouae> | Maybe an instance of MonadTrans from transformers? |
2025-03-13 04:49:31 +0100 | <c_wraith> | It's visible in the haddocks |
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: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:50:37 +0100 | <euouae> | Yeah you're right. It was not visible in GHCi |
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:52:11 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
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:55 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
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:53:08 +0100 | <jackdk> | euouae: I had to `:m + Control.Monad.State` to see it |
2025-03-13 04:53:22 +0100 | izzyfalco | (~jake_pers@user/izzyfalco) izzyfalco |
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:54:56 +0100 | <euouae> | somewhat frustrating to always have to run to haddock online |
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:55:53 +0100 | <euouae> | oh wait, right. thank you jackdk. |
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:56:48 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-03-13 04:58:02 +0100 | izzyfalco | (~jake_pers@user/izzyfalco) (Ping timeout: 268 seconds) |
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:10 +0100 | <jackdk> | Yes, the idea is to provide `MonadState st (ParsecT e s m)` by lifting the state actions from the inner `m` in a way that doesn't affect the `ParsecT`. |
2025-03-13 04:58:25 +0100 | <euouae> | yup I follow |
2025-03-13 05:08:16 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-13 05:08:33 +0100 | veryfungi | (~veryfungi@user/veryfungi) veryfungi |
2025-03-13 05:13:09 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-03-13 05:18:58 +0100 | <euouae> | hm... I'm sort of bothered by this megaparsec thing |
2025-03-13 05:19:49 +0100 | <euouae> | they suggest to use takeWhile1P and so on for fast parsing into Text. But it does not allow the predicate to have any state, e.g. I'd like to parse "at most 10" digits, or so; I don't want a list of 10 characters, I want it as a string |
2025-03-13 05:20:28 +0100 | <euouae> | I thought I was getting somewhere by writing a parser with a stateful counter, but then I realized I have nowhere to plug that parser in, there's no combinator in megaparsec that accepts a parser and spits out a Text "fast". |