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

Safe HaskellNone
LanguageHaskell98

XPrelude

Description

General specific prelude for language-puppet. Customization of the Protolude with extra specific utilities.

Synopsis

Documentation

type Container = HashMap Text Source #

text2Scientific :: Text -> Maybe Scientific Source #

scientific2text :: Scientific -> Text Source #

strictifyEither :: Either a b -> Either a b 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 #

Return all the keys of a map in a set.

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

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

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

dropInitialColons :: Text -> Text Source #

Remove the '::' token from a text if any.

unwrapError :: Doc -> Either PrettyError a -> IO a Source #

In case of a Left error, print and exit immediately.

(<>) :: Semigroup a => a -> a -> a infixr 6 #

An associative operation.

(<$$>) :: Doc -> Doc -> Doc #

(<+>) :: Doc -> Doc -> Doc #

(<//>) :: Doc -> Doc -> Doc #

align :: Doc -> Doc #

angles :: Doc -> Doc #

black :: Doc -> Doc #

blue :: Doc -> Doc #

bold :: Doc -> Doc #

braces :: Doc -> Doc #

column :: (Int -> Doc) -> Doc #

columns :: (Maybe Int -> Doc) -> Doc #

cyan :: Doc -> Doc #

debold :: Doc -> Doc #

dot :: Doc #

enclose :: Doc -> Doc -> Doc -> Doc #

encloseSep :: Doc -> Doc -> Doc -> [Doc] -> Doc #

fill :: Int -> Doc -> Doc #

fillBreak :: Int -> Doc -> Doc #

fillCat :: [Doc] -> Doc #

fillSep :: [Doc] -> Doc #

flatAlt :: Doc -> Doc -> Doc #

green :: Doc -> Doc #

hPutDoc :: Handle -> Doc -> IO () #

hang :: Int -> Doc -> Doc #

hcat :: [Doc] -> Doc #

hsep :: [Doc] -> Doc #

indent :: Int -> Doc -> Doc #

list :: [Doc] -> Doc #

nest :: Int -> Doc -> Doc #

nesting :: (Int -> Doc) -> Doc #

onblue :: Doc -> Doc #

oncyan :: Doc -> Doc #

onred :: Doc -> Doc #

parens :: Doc -> Doc #

plain :: Doc -> Doc #

punctuate :: Doc -> [Doc] -> [Doc] #

putDoc :: Doc -> IO () #

red :: Doc -> Doc #

sep :: [Doc] -> Doc #

tupled :: [Doc] -> Doc #

vcat :: [Doc] -> Doc #

vsep :: [Doc] -> Doc #

white :: Doc -> Doc #

yellow :: Doc -> Doc #

class Pretty a where #

Minimal complete definition

pretty

Methods

pretty :: a -> Doc #

prettyList :: [a] -> Doc #

Instances
Pretty Bool 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Bool -> Doc #

prettyList :: [Bool] -> Doc #

Pretty Char 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Char -> Doc #

prettyList :: [Char] -> Doc #

Pretty Double 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Double -> Doc #

prettyList :: [Double] -> Doc #

Pretty Float 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Float -> Doc #

prettyList :: [Float] -> Doc #

Pretty Int 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Int -> Doc #

prettyList :: [Int] -> Doc #

Pretty Integer 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Integer -> Doc #

prettyList :: [Integer] -> Doc #

Pretty () 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: () -> Doc #

prettyList :: [()] -> Doc #

Pretty Scientific Source # 
Instance details

Defined in XPrelude.PP

Methods

pretty :: Scientific -> Doc #

prettyList :: [Scientific] -> Doc #

Pretty Doc 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Doc -> Doc #

prettyList :: [Doc] -> Doc #

Pretty PrettyError Source # 
Instance details

Defined in XPrelude.PP

Pretty CompRegex Source # 
Instance details

Defined in Puppet.Language.Core

Pretty DataType Source # 
Instance details

Defined in Puppet.Language.Value

Methods

pretty :: DataType -> Doc #

prettyList :: [DataType] -> Doc #

Pretty PValue Source # 
Instance details

Defined in Puppet.Language.Value

Methods

pretty :: PValue -> Doc #

prettyList :: [PValue] -> Doc #

Pretty Resource Source # 
Instance details

Defined in Puppet.Language.Resource

Methods

pretty :: Resource -> Doc #

prettyList :: [Resource] -> Doc #

Pretty RIdentifier Source # 
Instance details

Defined in Puppet.Language.Resource

Pretty LinkType Source # 
Instance details

Defined in Puppet.Language.Resource

Methods

pretty :: LinkType -> Doc #

prettyList :: [LinkType] -> Doc #

Pretty CurContainerDesc Source # 
Instance details

Defined in Puppet.Language.Resource

Pretty LinkInformation Source # 
Instance details

Defined in Puppet.Interpreter.PrettyPrinter

Pretty Statement Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty VarAssignDecl Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty NodeDesc Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Methods

pretty :: NodeDesc -> Doc #

prettyList :: [NodeDesc] -> Doc #

Pretty SearchExpression Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty UDataType Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty Expression Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty SelectorCase Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty UnresolvedValue Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty ArrowOp Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Methods

pretty :: ArrowOp -> Doc #

prettyList :: [ArrowOp] -> Doc #

Pretty HOLambdaCall Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty LambdaParameters Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty LambdaFunc Source # 
Instance details

Defined in Puppet.Parser.PrettyPrinter

Pretty Expression Source # 
Instance details

Defined in Erb.Ruby

Pretty ResourceModifier Source # 
Instance details

Defined in Puppet.Interpreter.PrettyPrinter

Pretty TemplateSource Source # 
Instance details

Defined in Puppet.Interpreter.PrettyPrinter

Pretty ResDefaults Source # 
Instance details

Defined in Puppet.Interpreter.PrettyPrinter

Pretty TopLevelType Source # 
Instance details

Defined in Puppet.Interpreter.PrettyPrinter

Pretty RSearchExpression Source # 
Instance details

Defined in Puppet.Interpreter.PrettyPrinter

Pretty a => Pretty [a] 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: [a] -> Doc #

prettyList :: [[a]] -> Doc #

Pretty a => Pretty (Maybe a) 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: Maybe a -> Doc #

prettyList :: [Maybe a] -> Doc #

Pretty (InterpreterInstr a) Source # 
Instance details

Defined in Puppet.Interpreter.PrettyPrinter

(Pretty a, Pretty b) => Pretty (a, b) 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: (a, b) -> Doc #

prettyList :: [(a, b)] -> Doc #

Pretty (HashMap Text PValue) Source # 
Instance details

Defined in Puppet.Language.Value

Methods

pretty :: HashMap Text PValue -> Doc #

prettyList :: [HashMap Text PValue] -> Doc #

(Pretty a, Pretty b, Pretty c) => Pretty (a, b, c) 
Instance details

Defined in Text.PrettyPrint.ANSI.Leijen.Internal

Methods

pretty :: (a, b, c) -> Doc #

prettyList :: [(a, b, c)] -> Doc #

pplines :: Text -> Doc Source #

pretty print multiple lines of text.

ppline :: Text -> Doc Source #

pretty print a single line of text.

ppstring :: String -> Doc Source #

pretty print multiple lines of string.

pptext :: String -> Doc Source #

pretty print one line of string