Newest at the top
2024-07-07 15:53:01 +0200 | <hololeap> | and I was planning on adding a couple more for that mode, so the case statement is getting unruley. I suppose the best thing to do would be to make reinstall-atoms mode a separate command with its own options |
2024-07-07 15:51:01 +0200 | <tomsmeding> | right, I see |
2024-07-07 15:50:55 +0200 | <hololeap> | mostly, yes. however there is also a --target=... option which has a couple that are only valid with --mode=reinstall-atoms |
2024-07-07 15:48:41 +0200 | <tomsmeding> | in any case this whole thing is only really relevant for ReinstallAtomsMode, right? The others are orthogonal |
2024-07-07 15:48:08 +0200 | <hololeap> | maybe :p |
2024-07-07 15:48:00 +0200 | <tomsmeding> | s/make a/make a value of a/ |
2024-07-07 15:47:49 +0200 | <tomsmeding> | have I been unnecessarily hung up on the phrasing of your original question, where you asked for how to "check if" instead of how to make a data type given one of the fields? |
2024-07-07 15:46:51 +0200 | <hololeap> | the "reinstall-atoms" mode is something that only makes sense with the portage package manager, since it has the features to implement it. it's a special mode that I made with portage's features in mind |
2024-07-07 15:46:29 +0200 | <tomsmeding> | I see, so you're doing exactly what I was suggesting, in a way |
2024-07-07 15:45:06 +0200 | <hololeap> | https://github.com/gentoo-haskell/haskell-updater/blob/master/Distribution/Gentoo/Types/HUMode.hs |
2024-07-07 15:44:46 +0200 | <hololeap> | https://github.com/gentoo-haskell/haskell-updater/blob/master/Distribution/Gentoo/CmdLine.hs#L37-L99 |
2024-07-07 15:43:07 +0200 | <tomsmeding> | but then you need more than just the fact that ReinstallAtomsMode occurs within Portage, right? You also need a function that makes you a Portage given a ReinstallAtomsMode |
2024-07-07 15:42:29 +0200 | <hololeap> | that's actually what I was following. I have a model of all the possible command line combinations, and I'm trying to "parse" it into the ADT that encodes all the valid mode combinations |
2024-07-07 15:41:24 +0200 | <tomsmeding> | at the risk of cargo-culting, I'm trying to find out if this is a case where parse-don't-validate is applicable |
2024-07-07 15:40:47 +0200 | <tomsmeding> | Can you do the check _there_ instead of crashing? |
2024-07-07 15:40:39 +0200 | <tomsmeding> | would something crash? What would? |
2024-07-07 15:40:33 +0200 | <tomsmeding> | hololeap: okay sure, but what would happen if you'd just remove that case statement? |
2024-07-07 15:39:07 +0200 | <hololeap> | currently I have a big case statement that checks for any incompatible options, but it's big and annoying and error prone |
2024-07-07 15:37:14 +0200 | <hololeap> | tomsmeding: it's because the user is capable of doing --package-manager=paludis --mode=reinstall-atoms and they need to be told that it's unsupported |
2024-07-07 15:34:17 +0200 | ubert | (~Thunderbi@p200300ecdf008f0f0a6872e022c3958c.dip0.t-ipconnect.de) |
2024-07-07 15:33:57 +0200 | ubert | (~Thunderbi@p200300ecdf008f0f0a6872e022c3958c.dip0.t-ipconnect.de) (Remote host closed the connection) |
2024-07-07 15:32:03 +0200 | nhar | (~noah@c-73-237-54-185.hsd1.ga.comcast.net) (Ping timeout: 264 seconds) |
2024-07-07 15:31:30 +0200 | <tomsmeding> | or something else is off |
2024-07-07 15:31:26 +0200 | <tomsmeding> | the moment you're asking for "does this field occur somewhere in this data type", it sounds to me like the data structures are the wrong way round |
2024-07-07 15:30:33 +0200 | <tomsmeding> | thereby making this whole generics/whatever dance redundant |
2024-07-07 15:30:08 +0200 | <tomsmeding> | because if so, that sounds like that function should just return a Maybe :p |
2024-07-07 15:29:57 +0200 | <tomsmeding> | is the idea that there is some partial function `ReinstallAtomsMode -> PkgManage` and you want to prevent it from failing? |
2024-07-07 15:29:34 +0200 | <tomsmeding> | hololeap: once you have this information (that ReinstallAtomsMode is only a descendant of Portage and not of other things), what are you going to do with that information? |
2024-07-07 15:23:47 +0200 | nhar | (~noah@c-73-237-54-185.hsd1.ga.comcast.net) |
2024-07-07 15:13:32 +0200 | target_i | (~target_i@user/target-i/x-6023099) |
2024-07-07 15:12:57 +0200 | sp1ff | (~user@c-73-11-70-111.hsd1.wa.comcast.net) |
2024-07-07 15:10:56 +0200 | nhar | (~noah@c-73-237-54-185.hsd1.ga.comcast.net) (Ping timeout: 268 seconds) |
2024-07-07 15:05:49 +0200 | nhar | (~noah@c-73-237-54-185.hsd1.ga.comcast.net) |
2024-07-07 15:01:49 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-07 14:58:29 +0200 | soverysour | (~soverysou@user/soverysour) |
2024-07-07 14:58:29 +0200 | soverysour | (~soverysou@81.196.150.219) (Changing host) |
2024-07-07 14:58:29 +0200 | soverysour | (~soverysou@81.196.150.219) |
2024-07-07 14:46:03 +0200 | lxsameer | (~lxsameer@Serene/lxsameer) (Ping timeout: 260 seconds) |
2024-07-07 14:43:53 +0200 | <hololeap> | maybe I can rig something up with TypeFamilies |
2024-07-07 14:42:51 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-07 14:38:50 +0200 | <hololeap> | (or at the very least, "--mode=reinstall-atoms is not supported by X") |
2024-07-07 14:38:12 +0200 | <hololeap> | I want to use this structure to automatically say "--mode=reinstall-atoms is only supported by the Portage package manager" |
2024-07-07 14:37:27 +0200 | leah2 | (~leah@vuxu.org) (Ping timeout: 264 seconds) |
2024-07-07 14:37:17 +0200 | <hololeap> | here's the ADT: https://bpa.st/FNXQ |
2024-07-07 14:36:17 +0200 | <hololeap> | so I need some way to determine that e.g. ReinstallAtomsMode is an decendant of Portage, but not of the other constructors of PkgManager |
2024-07-07 14:36:12 +0200 | op_4 | (~tslil@user/op-4/x-9116473) |
2024-07-07 14:34:58 +0200 | <hololeap> | this is what the Rep looks like: https://bpa.st/DE3Q |
2024-07-07 14:33:58 +0200 | puke | (~puke@user/puke) |
2024-07-07 14:33:50 +0200 | op_4 | (~tslil@user/op-4/x-9116473) (Remote host closed the connection) |
2024-07-07 14:31:59 +0200 | <tomsmeding> | so yeah, KnownSymbol it is |