hoyo-0.6.0.0: Bookmark directories for cd
Copyright(c) Frederick Pringle 2023
LicenseBSD-3-Clause
Maintainerfreddyjepringle@gmail.com
Safe HaskellNone
LanguageHaskell2010

Hoyo.Config

Description

Configuration for the hoyo program. This is stored on-disk as a TOML file, usually at ~.confighoyo/config.toml

Synopsis

Documentation

data Config Source #

A representation of hoyo settings.

Instances

Instances details
Eq Config Source # 
Instance details

Defined in Hoyo.Internal.Types

Methods

(==) :: Config -> Config -> Bool #

(/=) :: Config -> Config -> Bool #

Show Config Source # 
Instance details

Defined in Hoyo.Internal.Types

defaultConfig :: Config Source #

The default config for hoyo.

encodeConfig :: Config -> Text Source #

Encode a Config to a Text.

encodeConfigFile :: (MonadIO m, MonadCatch m) => FilePath -> Config -> m (Either HoyoException ()) Source #

Encode a Config to a file.

setConfig :: MonadError HoyoException m => Text -> Text -> Config -> m Config Source #

Try to set a key-value pair in the config.

getKeyVals :: Config -> [(Text, AnyConfigValue)] Source #

Get TOML key-value pairs from a Config.