Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hinit.Config
Description
Global configuration
Synopsis
- data Config = Config {}
- configCodec :: TomlCodec Config
- licenseToToml :: LicenseId -> AnyValue
- tomlToLicense :: AnyValue -> Either TomlBiMapError LicenseId
- _LicenseId :: TomlBiMap LicenseId AnyValue
- licenseIdCodec :: Key -> TomlCodec LicenseId
- askConfig :: forall sig m. Has Terminal sig m => m Config
- getConfigFile :: Has (Lift IO) sig m => m (Path Abs File)
- readConfig :: (Has (Lift IO) sig m, Has (Throw ConfigParseError) sig m) => Path Abs File -> m (Maybe Config)
- getConfig :: (Has Terminal sig m, Has (Lift IO) sig m, Has (Throw ConfigParseError) sig m) => m Config
- buildContextFromConfig :: Has Time sig m => Text -> Config -> m (Context, Context)
Documentation
Constructors
Config | |
Instances
Eq Config Source # | |
Show Config Source # | |
Generic Config Source # | |
type Rep Config Source # | |
Defined in Hinit.Config type Rep Config = D1 ('MetaData "Config" "Hinit.Config" "hinit-0.2.2-inplace" 'False) (C1 ('MetaCons "Config" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "email") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "ghUserName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "license") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LicenseId)) :*: (S1 ('MetaSel ('Just "vcs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe VCS)) :*: S1 ('MetaSel ('Just "defAttrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Context))))) |
licenseToToml :: LicenseId -> AnyValue Source #
readConfig :: (Has (Lift IO) sig m, Has (Throw ConfigParseError) sig m) => Path Abs File -> m (Maybe Config) Source #