Logs: liberachat/#haskell
| 2021-07-13 00:46:49 | × | retroid_ quits (~retro@90.218.175.34) (Ping timeout: 268 seconds) |
| 2021-07-13 00:47:12 | <Raugh> | AWizzArd: geekosaur: thanks! |
| 2021-07-13 00:49:48 | → | favonia joins (~favonia@user/favonia) |
| 2021-07-13 00:52:08 | → | warnz joins (~warnz@2600:1700:77c0:5610:acd9:fdbc:f96e:2452) |
| 2021-07-13 00:52:48 | × | mikail_ quits (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f) (Ping timeout: 255 seconds) |
| 2021-07-13 00:56:45 | × | codedmart quits (codedmart@2600:3c01::f03c:92ff:fefe:8511) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 2021-07-13 00:56:51 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 255 seconds) |
| 2021-07-13 00:57:01 | → | codedmart joins (~codedmart@li335-49.members.linode.com) |
| 2021-07-13 01:08:18 | × | warnz quits (~warnz@2600:1700:77c0:5610:acd9:fdbc:f96e:2452) (Remote host closed the connection) |
| 2021-07-13 01:12:44 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2021-07-13 01:17:49 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-07-13 01:20:07 | → | notzmv joins (~zmv@user/notzmv) |
| 2021-07-13 01:20:09 | × | Jonno_FT1 quits (~come@api.carswap.me) (Quit: Reconnecting) |
| 2021-07-13 01:20:15 | → | Jonno_FTW joins (~come@api.carswap.me) |
| 2021-07-13 01:21:02 | × | smichel17 quits (~smichel17@2601:193:8300:4b9::600) (Quit: smichel17) |
| 2021-07-13 01:22:04 | × | Jonno_FTW quits (~come@api.carswap.me) (Changing host) |
| 2021-07-13 01:22:04 | → | Jonno_FTW joins (~come@user/jonno-ftw/x-0835346) |
| 2021-07-13 01:29:25 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 2021-07-13 01:29:48 | × | xff0x quits (~xff0x@2001:1a81:52d6:3f00:1a58:61d8:8aa3:1417) (Ping timeout: 272 seconds) |
| 2021-07-13 01:29:59 | <hololeap> | Axman6: that answered my question about how to get the --help option, but I would like to get some more fine-grained control over options that I don't think is going to be convenient using the Applicative and Alternative interface, |
| 2021-07-13 01:30:42 | → | chris-the-slurpa joins (~chris@81.96.113.213) |
| 2021-07-13 01:30:50 | → | Vajb joins (~Vajb@85-76-37-111-nat.elisa-mobile.fi) |
| 2021-07-13 01:31:02 | <hololeap> | I would like to do further processing of the arguments that were passed in, and have the option to exit and print the help outside the execParser function |
| 2021-07-13 01:31:25 | → | xff0x joins (~xff0x@2001:1a81:5314:1800:204a:df94:d24b:de67) |
| 2021-07-13 01:31:46 | <hololeap> | so having something like `printHelp :: ParserInfo a -> IO ()` would be very useful |
| 2021-07-13 01:34:03 | <hololeap> | for instance, I don't want to allow a certain number to be less than 1, but I don't think it's possible to check this within the Parser since there is no Monad instance |
| 2021-07-13 01:37:01 | → | nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-13 01:38:33 | × | Vajb quits (~Vajb@85-76-37-111-nat.elisa-mobile.fi) (Read error: Connection reset by peer) |
| 2021-07-13 01:40:21 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) |
| 2021-07-13 01:48:20 | × | alx741 quits (~alx741@186.178.108.22) (Quit: alx741) |
| 2021-07-13 01:51:20 | × | pavonia quits (~user@user/siracusa) (Read error: Connection reset by peer) |
| 2021-07-13 01:55:14 | × | nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2021-07-13 01:55:37 | → | smtnet3 joins (~asdfasdfa@202.36.244.25) |
| 2021-07-13 01:56:10 | → | pavonia joins (~user@user/siracusa) |
| 2021-07-13 01:56:12 | <dmj`> | hololeap: optparse-applicative supports all of that |
| 2021-07-13 02:03:54 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 276 seconds) |
| 2021-07-13 02:06:13 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 244 seconds) |
| 2021-07-13 02:06:20 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 2021-07-13 02:08:13 | → | hendursaga joins (~weechat@user/hendursaga) |
| 2021-07-13 02:09:48 | → | nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-13 02:11:40 | → | wei2912 joins (~wei2912@112.199.250.21) |
| 2021-07-13 02:15:21 | × | wei2912 quits (~wei2912@112.199.250.21) (Read error: Connection reset by peer) |
| 2021-07-13 02:16:10 | → | wei2912 joins (~wei2912@112.199.250.21) |
| 2021-07-13 02:16:34 | × | P1RATEZ quits (piratez@user/p1ratez) (Remote host closed the connection) |
| 2021-07-13 02:19:36 | × | td_ quits (~td@94.134.91.208) (Ping timeout: 272 seconds) |
| 2021-07-13 02:19:42 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 2021-07-13 02:19:42 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (molybdenum.libera.chat (Nickname regained by services))) |
| 2021-07-13 02:19:42 | finn_elija | is now known as FinnElija |
| 2021-07-13 02:21:03 | → | td_ joins (~td@94.134.91.7) |
| 2021-07-13 02:21:18 | × | derelict quits (~derelict@user/derelict) (Ping timeout: 256 seconds) |
| 2021-07-13 02:21:34 | → | koz- joins (~koz@121.99.240.58) |
| 2021-07-13 02:22:05 | × | koz quits (~koz@2404:4408:4309:8800:f7ec:14dd:f995:fa8c) (Ping timeout: 255 seconds) |
| 2021-07-13 02:22:31 | koz- | is now known as koz |
| 2021-07-13 02:25:03 | × | nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 255 seconds) |
| 2021-07-13 02:30:21 | → | nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-13 02:35:32 | × | zmt01 quits (~zmt00@user/zmt00) (Quit: Gone.) |
| 2021-07-13 02:38:48 | → | zmt00 joins (~zmt00@user/zmt00) |
| 2021-07-13 02:42:52 | × | phma quits (phma@2001:5b0:211b:d008:91ae:cdcd:6362:add2) (Read error: Connection reset by peer) |
| 2021-07-13 02:47:58 | → | phma joins (~phma@host-67-44-208-254.hnremote.net) |
| 2021-07-13 02:48:27 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 255 seconds) |
| 2021-07-13 02:54:36 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 276 seconds) |
| 2021-07-13 02:57:33 | × | danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (Ping timeout: 268 seconds) |
| 2021-07-13 02:58:35 | → | danso joins (~danso@23-233-111-52.cpe.pppoe.ca) |
| 2021-07-13 03:00:05 | × | finsternis quits (~X@23.226.237.192) (Remote host closed the connection) |
| 2021-07-13 03:00:13 | <hololeap> | dmj`: how do you just print out the help as an IO operation? |
| 2021-07-13 03:00:33 | → | eggplant_ joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-13 03:02:34 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 2021-07-13 03:02:51 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:6d00:2ab2:6519:235b) (Ping timeout: 255 seconds) |
| 2021-07-13 03:05:09 | <dmj`> | hololeap: you can do it all purely before you print anything, https://hackage.haskell.org/package/optparse-applicative-0.16.1.0/docs/Options-Applicative.html#v:execParserPure |
| 2021-07-13 03:06:41 | hook54321_ | is now known as hook54321 |
| 2021-07-13 03:08:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-07-13 03:10:40 | <dmj`> | hololeap: running a failing parser purely will get you the help object |
| 2021-07-13 03:12:22 | → | o1lo01ol1o joins (~o1lo01ol1@bl7-89-228.dsl.telepac.pt) |
| 2021-07-13 03:12:23 | <hololeap> | dmj`: that makes sense, but I have an Int that represents string length which needs to be >=1 ... as far as I can tell, there would be no way to check this and have the parser fail until after the parser was run, even running it purely |
| 2021-07-13 03:14:39 | <hololeap> | even if that were possible, there are some other fine-grained things I would like to do, such as ensuring at least one of a set of options is passed, or none at all |
| 2021-07-13 03:15:26 | <hololeap> | it can be done with the Alternative instance, but it just makes more sense to have a second level of argument validation after the Parser is run, and it would be nice to have the option to print the help screen there |
| 2021-07-13 03:15:54 | <glguy> | hololeap: an flag taking an option would use something like: option :: ReadM a -> Mod OptionFields a -> Parser a |
| 2021-07-13 03:15:56 | <dmj`> | hololeap: you can validate the arguments before you run the parser, then just run your parser with prefShowHelpOnEmpty = True |
| 2021-07-13 03:15:56 | → | thiross joins (~user@173.242.113.143.16clouds.com) |
| 2021-07-13 03:16:08 | <glguy> | ReadM is a Monad, so you can do arbitrary dependencies there (like checking for >= 1) |
| 2021-07-13 03:16:20 | <glguy> | hololeap: is that what you're asking about? |
| 2021-07-13 03:16:50 | × | o1lo01ol1o quits (~o1lo01ol1@bl7-89-228.dsl.telepac.pt) (Ping timeout: 256 seconds) |
| 2021-07-13 03:17:58 | × | nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2021-07-13 03:21:00 | <hololeap> | glguy: that was one of my concerns, and you make a good point about ReadM being a Monad. I will remember that |
| 2021-07-13 03:22:36 | <hololeap> | but in general, I want to do some validation of arguments that seem like they would be much easier to do _after_ running the Parser, and I would like to have access to the help text in case I want to print that out |
| 2021-07-13 03:23:12 | <hololeap> | I could just move on and print out an error without the help text |
| 2021-07-13 03:24:40 | × | phma quits (~phma@host-67-44-208-254.hnremote.net) (Read error: Connection reset by peer) |
| 2021-07-13 03:25:07 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 2021-07-13 03:25:48 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 255 seconds) |
| 2021-07-13 03:34:11 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-07-13 03:37:28 | → | nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-13 03:38:56 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 2021-07-13 03:39:49 | → | phma joins (phma@2001:5b0:211f:8638:196:5581:d6d8:1f7e) |
| 2021-07-13 03:42:54 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2021-07-13 03:52:05 | × | thiross quits (~user@173.242.113.143.16clouds.com) (Remote host closed the connection) |
| 2021-07-13 03:52:22 | → | thiross joins (~user@173.242.113.143.16clouds.com) |
| 2021-07-13 04:02:12 | × | juhp quits (~juhp@128.106.188.66) (Quit: juhp) |
| 2021-07-13 04:02:25 | → | juhp joins (~juhp@128.106.188.66) |
| 2021-07-13 04:04:57 | × | thiross quits (~user@173.242.113.143.16clouds.com) (Ping timeout: 255 seconds) |
| 2021-07-13 04:11:56 | → | nick80 joins (~nick@76-236-222-208.lightspeed.tukrga.sbcglobal.net) |
All times are in UTC.