Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains configuration data type.
Synopsis
- data LifePath
- data LifeConfiguration = LifeConfiguration {}
- singleDirConfig :: Path Rel Dir -> LifeConfiguration
- singleFileConfig :: Path Rel File -> LifeConfiguration
- lifeConfigMinus :: LifeConfiguration -> LifeConfiguration -> LifeConfiguration
- files :: HasFiles s a => Lens' s a
- directories :: HasDirectories s a => Lens' s a
- parseHomeLife :: IO LifeConfiguration
- parseRepoLife :: IO LifeConfiguration
- parseLifeConfiguration :: MonadThrow m => Text -> m LifeConfiguration
- renderLifeConfiguration :: Bool -> LifeConfiguration -> Text
- writeGlobalLife :: LifeConfiguration -> IO ()
Documentation
Data type to represent either file or directory.
data LifeConfiguration Source #
Instances
Eq LifeConfiguration Source # | |
Defined in Life.Configuration (==) :: LifeConfiguration -> LifeConfiguration -> Bool # (/=) :: LifeConfiguration -> LifeConfiguration -> Bool # | |
Show LifeConfiguration Source # | |
Defined in Life.Configuration showsPrec :: Int -> LifeConfiguration -> ShowS # show :: LifeConfiguration -> String # showList :: [LifeConfiguration] -> ShowS # | |
Semigroup LifeConfiguration Source # | |
Defined in Life.Configuration (<>) :: LifeConfiguration -> LifeConfiguration -> LifeConfiguration # sconcat :: NonEmpty LifeConfiguration -> LifeConfiguration # stimes :: Integral b => b -> LifeConfiguration -> LifeConfiguration # | |
Monoid LifeConfiguration Source # | |
Defined in Life.Configuration |
:: LifeConfiguration | repo .life config |
-> LifeConfiguration | global config |
-> LifeConfiguration | configs that are not in global |
Lenses for LifeConfiguration
directories :: HasDirectories s a => Lens' s a Source #
Parse LifeConfiguration
under ~/.life
parseHomeLife :: IO LifeConfiguration Source #
Reads LifeConfiguration
from ~/.life
file.
parseRepoLife :: IO LifeConfiguration Source #
Reads LifeConfiguration
from ~/dotfiles/.life
file.
parseLifeConfiguration :: MonadThrow m => Text -> m LifeConfiguration Source #
Render LifeConfiguration
under ~/.life
renderLifeConfiguration Source #
:: Bool | True to see empty entries in output |
-> LifeConfiguration | |
-> Text |
Converts LifeConfiguration
into TOML file.
writeGlobalLife :: LifeConfiguration -> IO () Source #