Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghcup config unset #1058

Open
hasufell opened this issue May 3, 2024 · 0 comments
Open

ghcup config unset #1058

hasufell opened this issue May 3, 2024 · 0 comments

Comments

@hasufell
Copy link
Member

hasufell commented May 3, 2024

Following #1057

We have user settings:

data UserSettings = UserSettings
  { uCache             :: Maybe Bool
  , uMetaCache         :: Maybe Integer
  , uMetaMode          :: Maybe MetaMode
  , uNoVerify          :: Maybe Bool
  , uVerbose           :: Maybe Bool
  , uKeepDirs          :: Maybe KeepDirs
  , uDownloader        :: Maybe Downloader
  , uKeyBindings       :: Maybe UserKeyBindings
  , uUrlSource         :: Maybe URLSource
  , uNoNetwork         :: Maybe Bool
  , uGPGSetting        :: Maybe GPGSetting
  , uPlatformOverride  :: Maybe PlatformRequest
  , uMirrors           :: Maybe DownloadMirrors
  , uDefGHCConfOptions :: Maybe [String]
  }

And the actual settings:

data Settings = Settings
  { cache             :: Bool
  , metaCache         :: Integer
  , metaMode          :: MetaMode
  , noVerify          :: Bool
  , keepDirs          :: KeepDirs
  , downloader        :: Downloader
  , verbose           :: Bool
  , urlSource         :: URLSource
  , noNetwork         :: Bool
  , gpgSetting        :: GPGSetting
  , noColor           :: Bool -- this also exists in LoggerConfig
  , platformOverride  :: Maybe PlatformRequest
  , mirrors           :: DownloadMirrors
  , defGHCConfOptions :: [String]
  }

platformOverride here is special, since it's the only Maybe that gets passed through. In UserSettings, all records are Maybe, so we can unset any key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant