| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
XPrelude
Description
General specific prelude for language-puppet. Customization of the Protolude with extra specific utilities.
- type Container = HashMap Text
- text2Scientific :: Text -> Maybe Scientific
- scientific2text :: Scientific -> Text
- strictifyEither :: Either a b -> Either a b
- ifromList :: (Monoid m, At m, Foldable f) => f (Index m, IxValue m) -> m
- ikeys :: (Eq k, Hashable k) => HashMap k v -> HashSet k
- isingleton :: (Monoid b, At b) => Index b -> IxValue b -> b
- ifromListWith :: (Monoid m, At m, Foldable f) => (IxValue m -> IxValue m -> IxValue m) -> f (Index m, IxValue m) -> m
- iinsertWith :: At m => (IxValue m -> IxValue m -> IxValue m) -> Index m -> IxValue m -> m -> m
- iunionWith :: (Hashable k, Eq k) => (v -> v -> v) -> HashMap k v -> HashMap k v -> HashMap k v
- isEmpty :: (Eq x, Monoid x) => x -> Bool
- dropInitialColons :: Text -> Text
- loggerName :: String
- logDebug :: Text -> IO ()
- logInfo :: Text -> IO ()
- logInfoStr :: String -> IO ()
- logWarning :: Text -> IO ()
- logWarningStr :: String -> IO ()
- logError :: Text -> IO ()
- logCritical :: Text -> IO ()
- logCriticalStr :: String -> IO ()
- logDebugStr :: String -> IO ()
- unwrapError :: Doc -> Either PrettyError a -> IO a
- newtype PrettyError = PrettyError {}
- pplines :: Text -> Doc
- ppline :: Text -> Doc
- ppstring :: String -> Doc
- pptext :: String -> Doc
- prettyToShow :: Doc -> String
Documentation
text2Scientific :: Text -> Maybe Scientific #
scientific2text :: Scientific -> Text #
strictifyEither :: Either a b -> Either a b #
ifromList :: (Monoid m, At m, Foldable f) => f (Index m, IxValue m) -> m #
Helper for hashmap, in case we want another kind of map.
ifromListWith :: (Monoid m, At m, Foldable f) => (IxValue m -> IxValue m -> IxValue m) -> f (Index m, IxValue m) -> m #
dropInitialColons :: Text -> Text #
Remove the '::' token from a text if any.
loggerName :: String #
logInfoStr :: String -> IO () #
logWarning :: Text -> IO () #
logWarningStr :: String -> IO () #
logCritical :: Text -> IO () #
logCriticalStr :: String -> IO () #
logDebugStr :: String -> IO () #
unwrapError :: Doc -> Either PrettyError a -> IO a #
In case of a Left error, print and exit immediately.
newtype PrettyError #
Constructors
| PrettyError | |
prettyToShow :: Doc -> String #