Newest at the top
| 2026-02-11 13:14:09 +0100 | <Leary> | No, it's outside of the `<|>`. |
| 2026-02-11 13:13:21 +0100 | <ski> | (seems to me like the failing end of input ought to trigger backtracking, with the `try' present there, no ?) |
| 2026-02-11 13:06:35 +0100 | <Leary> | `parseTest` seems to be for visual inspection, not automated testing. |
| 2026-02-11 13:05:03 +0100 | <__monty__> | Or use parseTest and just add the type annotation that it complains about. |
| 2026-02-11 13:04:51 +0100 | <Leary> | I think they want the opposite; add `<* takeWhileP (const True)`. |
| 2026-02-11 13:03:51 +0100 | <merijn> | i.e.: parseMaybe (foo <* eof) "stuff here" |
| 2026-02-11 13:03:15 +0100 | <merijn> | bwe: I mean, you could just add "<* eof" to each parse before feeding to parseMaybe? :) |
| 2026-02-11 13:02:36 +0100 | <bwe> | Leary: So this answers why `parseMaybe` behaves differently than when I combine the parser with others. What's then the right function to (unit) test parser combinator segments? |
| 2026-02-11 13:00:15 +0100 | <Leary> | bwe: "This function also parses eof, so if the parser doesn't consume all of its input, it will fail." |
| 2026-02-11 12:58:36 +0100 | <bwe> | __monty__: But why does it return Nothing, then? (Flipping fixes it for me but I still don't understand the concept.) |
| 2026-02-11 12:58:10 +0100 | comonad | (~comonad@p200300d02722ae00dce4ce9451b59974.dip0.t-ipconnect.de) |
| 2026-02-11 12:56:33 +0100 | weary-traveler | (~user@user/user363627) user363627 |
| 2026-02-11 12:55:22 +0100 | merijn | (~merijn@77.242.116.146) merijn |
| 2026-02-11 12:54:34 +0100 | housemate | (~housemate@202.7.248.67) (Ping timeout: 260 seconds) |
| 2026-02-11 12:54:19 +0100 | Enrico63 | (~Enrico63@host-79-22-157-220.retail.telecomitalia.it) Enrico63 |
| 2026-02-11 12:53:21 +0100 | trickard_ | (~trickard@cpe-54-98-47-163.wireline.com.au) |
| 2026-02-11 12:47:53 +0100 | <__monty__> | In this case I assume you want to flip the argument order basically. |
| 2026-02-11 12:47:34 +0100 | <__monty__> | bwe: <|> uses its left argument if it succeeds, so if it does the right argument is never tried. |
| 2026-02-11 12:46:31 +0100 | <bwe> | I mean `parseMaybe (try (1 <$ "abc") <|> 1 <$ "abcd") "abcd"` of course. There, the second does not succeed, but I want it to succeed. |
| 2026-02-11 12:46:01 +0100 | trickard_ | (~trickard@cpe-54-98-47-163.wireline.com.au) (Ping timeout: 246 seconds) |
| 2026-02-11 12:42:26 +0100 | <Leary> | bwe: Why would it be? The first succeeds. |
| 2026-02-11 12:40:24 +0100 | j1n37 | (~j1n37@user/j1n37) j1n37 |
| 2026-02-11 12:40:18 +0100 | <bwe> | tomsmeding: Thanks for the recommendation of the fsnotify package (yet to check it out). |
| 2026-02-11 12:39:44 +0100 | <bwe> | Why is the second (Megaparsec) parser not being evaluated? `parseMaybe (try (1 <$ "abc") <|> 1 <$ "abcd") "abcd"` -- parseTest is of no help as it moans about ambiguous types. And no, encapsulating each parser with try doesn't help either (assuming the backtracing is the issue). |
| 2026-02-11 12:38:20 +0100 | j1n37 | (~j1n37@user/j1n37) (Read error: Connection reset by peer) |
| 2026-02-11 12:36:32 +0100 | <ski> | (i'd first done it in a kludgey way, with the traditional precedences, but it turned out to not work for more complex examples. oh, and yea, i'm pretty sure this should work for mixfix with individual precedences specified for the ends of the constituent lexemes (cf. Annika Aasa's papers on parsing)) |
| 2026-02-11 12:35:11 +0100 | trickard_ | (~trickard@cpe-54-98-47-163.wireline.com.au) |
| 2026-02-11 12:35:10 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 246 seconds) |
| 2026-02-11 12:34:58 +0100 | trickard_ | (~trickard@cpe-54-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2026-02-11 12:34:44 +0100 | <ski> | got annoyed at not having `BlockArguments'-style printing of trailing lambda (including inside of an outer bracketting), with a simple standard precedence printer that i used for some examples i was playing around with, so i threw the above together, to see whether my initial hunch for how to do it would work |
| 2026-02-11 12:34:44 +0100 | comonad | (~comonad@p200300d02722ae00dce4ce9451b59974.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2026-02-11 12:30:09 +0100 | <Leary> | Haskell98 printing in a better timeline. |
| 2026-02-11 12:29:50 +0100 | Enrico63 | (~Enrico63@host-79-22-157-220.retail.telecomitalia.it) (Quit: Client closed) |
| 2026-02-11 12:28:34 +0100 | merijn | (~merijn@77.242.116.146) merijn |
| 2026-02-11 12:20:48 +0100 | <tomsmeding> | controversional BlockArguments printing :p |
| 2026-02-11 12:16:03 +0100 | trickard_ | (~trickard@cpe-54-98-47-163.wireline.com.au) |
| 2026-02-11 12:15:50 +0100 | trickard | (~trickard@cpe-54-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2026-02-11 12:15:49 +0100 | comerijn | (~merijn@77.242.116.146) (Ping timeout: 255 seconds) |
| 2026-02-11 12:06:44 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 260 seconds) |
| 2026-02-11 12:05:42 +0100 | trickard__ | trickard |
| 2026-02-11 12:03:40 +0100 | comerijn | (~merijn@77.242.116.146) merijn |
| 2026-02-11 11:46:38 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) sord937 |
| 2026-02-11 11:46:18 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
| 2026-02-11 11:45:23 +0100 | Googulator33 | Googulator |
| 2026-02-11 11:44:17 +0100 | oskarw | (~user@user/oskarw) oskarw |
| 2026-02-11 11:44:00 +0100 | absence | (torgeihe@hildring.pvv.ntnu.no) |
| 2026-02-11 11:43:22 +0100 | juri_ | (~juri@212.86.50.13) (Read error: Connection reset by peer) |
| 2026-02-11 11:43:13 +0100 | trickard_ | (~trickard@cpe-54-98-47-163.wireline.com.au) (Ping timeout: 264 seconds) |
| 2026-02-11 11:43:13 +0100 | juri_ | (~juri@212.86.50.13) juri_ |
| 2026-02-11 11:42:37 +0100 | oskarw | (~user@user/oskarw) (Ping timeout: 264 seconds) |