Safe Haskell | None |
---|
Hbro.Config
- data ResourceAction
- data Verbosity
- data Config m = Config {
- _homePage :: URI
- _verbosity :: Verbosity
- _keyBindings :: Map Mode (Bindings m)
- _onDownload :: URI -> String -> Int -> m ()
- _onKeyStroke :: [Stroke] -> m ()
- _onLinkClicked :: MouseButton -> URI -> m ()
- _onLoadRequested :: URI -> m ()
- _onLoadFinished :: m ()
- _onNewWindow :: URI -> m ()
- _onResourceOpened :: URI -> String -> m ResourceAction
- _onTitleChanged :: String -> m ()
- _commands :: CommandsMap m
- verbosity :: forall m. Lens' (Config m) Verbosity
- onTitleChanged :: forall m. Lens' (Config m) (String -> m ())
- onResourceOpened :: forall m. Lens' (Config m) (URI -> String -> m ResourceAction)
- onNewWindow :: forall m. Lens' (Config m) (URI -> m ())
- onLoadRequested :: forall m. Lens' (Config m) (URI -> m ())
- onLoadFinished :: forall m. Lens' (Config m) (m ())
- onLinkClicked :: forall m. Lens' (Config m) (MouseButton -> URI -> m ())
- onKeyStroke :: forall m. Lens' (Config m) ([Stroke] -> m ())
- onDownload :: forall m. Lens' (Config m) (URI -> String -> Int -> m ())
- keyBindings :: forall m. Lens' (Config m) (Map Mode (Bindings m))
- homePage :: forall m. Lens' (Config m) URI
- commands :: forall m. Lens' (Config m) (CommandsMap m)
- class Monad m => ConfigReader n m | m -> n where
- readConfig :: Simple Lens (Config n) a -> m a
- class Monad m => ConfigWriter n m | m -> n where
- writeConfig :: Simple Lens (Config n) a -> a -> m ()
- type ConfigState n m = (ConfigReader n m, ConfigWriter n m)
- modifyConfig :: ConfigState n m => Simple Lens (Config n) a -> (a -> a) -> m ()
- unlessQuiet :: (MonadBase IO m, ConfigReader n m) => m () -> m ()
- whenLoud :: (MonadBase IO m, ConfigReader n m) => m () -> m ()
- log :: (MonadBase IO m, ConfigReader n m) => String -> m ()
- logV :: (MonadBase IO m, ConfigReader n m) => String -> m ()
- bind :: (MonadBase IO m, ConfigState m m) => Mode -> String -> m () -> m ()
Documentation
data ResourceAction Source
Custom settings provided by the user
Constructors
Config | |
Fields
|
onTitleChanged :: forall m. Lens' (Config m) (String -> m ())Source
onResourceOpened :: forall m. Lens' (Config m) (URI -> String -> m ResourceAction)Source
onNewWindow :: forall m. Lens' (Config m) (URI -> m ())Source
onLoadRequested :: forall m. Lens' (Config m) (URI -> m ())Source
onLoadFinished :: forall m. Lens' (Config m) (m ())Source
onLinkClicked :: forall m. Lens' (Config m) (MouseButton -> URI -> m ())Source
onKeyStroke :: forall m. Lens' (Config m) ([Stroke] -> m ())Source
commands :: forall m. Lens' (Config m) (CommandsMap m)Source
class Monad m => ConfigReader n m | m -> n whereSource
MonadReader
for Config
Methods
readConfig :: Simple Lens (Config n) a -> m aSource
Instances
ConfigReader K K | |
ConfigReader n ((->) (Config n)) |
class Monad m => ConfigWriter n m | m -> n whereSource
MonadWriter
for Config
Methods
writeConfig :: Simple Lens (Config n) a -> a -> m ()Source
Instances
type ConfigState n m = (ConfigReader n m, ConfigWriter n m)Source
MonadState
for Config
modifyConfig :: ConfigState n m => Simple Lens (Config n) a -> (a -> a) -> m ()Source
unlessQuiet :: (MonadBase IO m, ConfigReader n m) => m () -> m ()Source
Run an action unless verbosity is Quiet