| Safe Haskell | None | 
|---|---|
| Language | GHC2021 | 
Navi.Utils
Description
Provides utilities.
Since: 0.1
Synopsis
- getFieldOptArrayOf :: DecodeTOML a => Text -> Decoder [a]
- commandDecoder :: Decoder Command
- urgencyLevelOptDecoder :: Decoder (Maybe UrgencyLevel)
- escapeDoubleQuotes :: Text -> Text
- displayInner :: Exception e => e -> String
- whenJust :: Applicative f => Maybe a -> (a -> f ()) -> f ()
TOML
Decoding utils
getFieldOptArrayOf :: DecodeTOML a => Text -> Decoder [a] Source #
Decodes an optional list. This is morally
getFieldOptWith (getArrayOf tomlDecoder) :: Text -> Decoder (Maybe [a])
except we return an empty list when the key is missing rather than
 Nothing.
Since: 0.1
Specific decoders
commandDecoder :: Decoder Command Source #
TOML decoder for Command with field name "command".
Since: 0.1
urgencyLevelOptDecoder :: Decoder (Maybe UrgencyLevel) Source #
TOML decoder for optional UrgencyLevel with field name "urgency".
Since: 0.1
Misc
escapeDoubleQuotes :: Text -> Text Source #
Escape double quotes in strings.
displayInner :: Exception e => e -> String Source #
whenJust :: Applicative f => Maybe a -> (a -> f ()) -> f () Source #
Since: 0.1