language-puppet-1.3.1.1: Tools to parse and evaluate the Puppet DSL.

Safe HaskellNone
LanguageHaskell98

Puppet.Utils

Contents

Description

Those are utility functions, most of them being pretty much self explanatory.

Synopsis

Documentation

textElem :: Char -> Text -> Bool Source

getDirectoryContents :: Text -> IO [Text] Source

takeBaseName :: Text -> Text Source

See System.FilePath.Posix

takeDirectory :: Text -> Text Source

See System.FilePath.Posix

strictifyEither :: Either a b -> Either a b Source

loadYamlFile :: FromJSON a => FilePath -> IO a Source

Read a yaml file and throw a runtime error if the parsing fails

scientific2text :: Scientific -> Text Source

text2Scientific :: Text -> Maybe Scientific Source

getFiles :: Text -> Text -> Text -> IO [Text] Source

ifromList :: (Monoid m, At m, Foldable f) => f (Index m, IxValue m) -> m Source

helper for hashmap, in case we want another kind of map ..

ikeys :: (Eq k, Hashable k) => HashMap k v -> HashSet k Source

isingleton :: (Monoid b, At b) => Index b -> IxValue b -> b Source

ifromListWith :: (Monoid m, At m, Foldable f) => (IxValue m -> IxValue m -> IxValue m) -> f (Index m, IxValue m) -> m Source

iunionWith :: (Hashable k, Eq k) => (v -> v -> v) -> HashMap k v -> HashMap k v -> HashMap k v Source

iinsertWith :: At m => (IxValue m -> IxValue m -> IxValue m) -> Index m -> IxValue m -> m -> m Source

re-export