-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Tools to parse and evaluate the Puppet DSL.
--   
--   This is a set of tools that is supposed to fill all your Puppet needs
--   : syntax checks, catalog compilation, PuppetDB queries, simulationg of
--   complex interactions between nodes, Puppet master replacement, and
--   more !
@package language-puppet
@version 1.3.8.1

module SafeProcess
safeReadProcessTimeout :: String -> [String] -> Text -> Int -> IO (Maybe (Either String Text))
safeCreateProcess :: String -> [String] -> StdStream -> StdStream -> StdStream -> ((Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> IO a) -> IO a
safeReadProcess :: String -> [String] -> Text -> IO (Either String Text)
terminateProcessGroup :: ProcessHandle -> IO ()


-- | Those are utility functions, most of them being pretty much self
--   explanatory.
module Puppet.Utils
textElem :: Char -> Text -> Bool
getDirectoryContents :: Text -> IO [Text]

-- | See System.FilePath.Posix
takeBaseName :: Text -> Text

-- | See System.FilePath.Posix
takeDirectory :: Text -> Text
strictifyEither :: Either a b -> Either a b

-- | Read a yaml file and throw a runtime error if the parsing fails
loadYamlFile :: FromJSON a => FilePath -> IO a
scientific2text :: Scientific -> Text
text2Scientific :: Text -> Maybe Scientific
getFiles :: Text -> Text -> Text -> IO [Text]

-- | helper for hashmap, in case we want another kind of map ..
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
iunionWith :: (Hashable k, Eq k) => (v -> v -> v) -> HashMap k v -> HashMap k v -> HashMap k v
iinsertWith :: At m => (IxValue m -> IxValue m -> IxValue m) -> Index m -> IxValue m -> m -> m


-- | A quickly done module that exports utility functions used to collect
--   various statistics. All statistics are stored in a MVar holding a
--   HashMap.
--   
--   This is not accurate in the presence of lazy evaluation. Nothing is
--   forced.
module Puppet.Stats

-- | Wraps a computation, and measures related execution statistics.
measure :: MStats -> Text -> IO a -> IO a

-- | Create a new statistical container.
newStats :: IO MStats

-- | Returns the actual statistical values.
getStats :: MStats -> IO StatsTable

-- | A table where keys are the names of the computations, and values are
--   <a>StatsPoint</a>s.
type StatsTable = HashMap Text StatsPoint
data StatsPoint
StatsPoint :: !Int -> !Double -> !Double -> !Double -> StatsPoint

-- | Total number of calls to a computation
[_statspointCount] :: StatsPoint -> !Int

-- | Total time spent during this computation
[_statspointTotal] :: StatsPoint -> !Double

-- | Minimum execution time
[_statspointMin] :: StatsPoint -> !Double

-- | Maximum execution time
[_statspointMax] :: StatsPoint -> !Double
data MStats
instance GHC.Show.Show Puppet.Stats.StatsPoint


-- | All the types used for parsing, and helpers working on these types.
module Puppet.Parser.Types

-- | Position in a puppet file. Currently an alias to <a>SourcePos</a>.
type Position = SourcePos

-- | A pair containing the start and end of a given token.
type PPosition = Pair Position Position

-- | Generates an initial position based on a filename.
initialPPos :: Text -> PPosition

-- | Generates a <a>PPosition</a> based on a filename and line number.
toPPos :: Text -> Int -> PPosition
lSourceName :: Lens' Position String
lSourceLine :: Lens' Position Pos
lSourceColumn :: Lens' Position Pos

-- | Properly capitalizes resource types
capitalizeRT :: Text -> Text
rel2text :: LinkType -> Text

-- | The <a>Expression</a>s
data Expression
Equal :: !Expression -> !Expression -> Expression
Different :: !Expression -> !Expression -> Expression
Not :: !Expression -> Expression
And :: !Expression -> !Expression -> Expression
Or :: !Expression -> !Expression -> Expression
LessThan :: !Expression -> !Expression -> Expression
MoreThan :: !Expression -> !Expression -> Expression
LessEqualThan :: !Expression -> !Expression -> Expression
MoreEqualThan :: !Expression -> !Expression -> Expression
RegexMatch :: !Expression -> !Expression -> Expression
NotRegexMatch :: !Expression -> !Expression -> Expression
Contains :: !Expression -> !Expression -> Expression
Addition :: !Expression -> !Expression -> Expression
Substraction :: !Expression -> !Expression -> Expression
Division :: !Expression -> !Expression -> Expression
Multiplication :: !Expression -> !Expression -> Expression
Modulo :: !Expression -> !Expression -> Expression
RightShift :: !Expression -> !Expression -> Expression
LeftShift :: !Expression -> !Expression -> Expression
Lookup :: !Expression -> !Expression -> Expression
Negate :: !Expression -> Expression

-- | All conditionals are stored in this format.
ConditionalValue :: !Expression -> !(Vector (Pair SelectorCase Expression)) -> Expression

-- | This is for <i>higher order functions</i>.
FunctionApplication :: !Expression -> !Expression -> Expression

-- | Terminal object contains no expression
Terminal :: !UnresolvedValue -> Expression
data SelectorCase
SelectorValue :: !UnresolvedValue -> SelectorCase
SelectorType :: !DataType -> SelectorCase
SelectorDefault :: SelectorCase

-- | An unresolved value, typically the parser's output.
data UnresolvedValue

-- | Special tokens generated when parsing the <tt>true</tt> or
--   <tt>false</tt> literals.
UBoolean :: !Bool -> UnresolvedValue

-- | Raw string.
UString :: !Text -> UnresolvedValue

-- | A string that might contain variable references. The type should be
--   refined at one point.
UInterpolable :: !(Vector Expression) -> UnresolvedValue

-- | Special token that is generated when parsing the <tt>undef</tt>
--   literal.
UUndef :: UnresolvedValue

-- | A Resource[reference]
UResourceReference :: !Text -> !Expression -> UnresolvedValue
UArray :: !(Vector Expression) -> UnresolvedValue
UHash :: !(Vector (Pair Expression Expression)) -> UnresolvedValue

-- | The regular expression compilation is performed during parsing.
URegexp :: !CompRegex -> UnresolvedValue
UVariableReference :: !Text -> UnresolvedValue
UFunctionCall :: !Text -> !(Vector Expression) -> UnresolvedValue
UHOLambdaCall :: !HOLambdaCall -> UnresolvedValue
UNumber :: !Scientific -> UnresolvedValue

-- | High Order "lambdas"
data LambdaFunc
LambEach :: LambdaFunc
LambMap :: LambdaFunc
LambReduce :: LambdaFunc
LambFilter :: LambdaFunc
LambSlice :: LambdaFunc
LambLookup :: LambdaFunc
data HOLambdaCall
HOLambdaCall :: !LambdaFunc -> !(Maybe Expression) -> !LambdaParameters -> !(Vector Statement) -> !(Maybe Expression) -> HOLambdaCall
[_hoLambdaFunc] :: HOLambdaCall -> !LambdaFunc
[_hoLambdaExpr] :: HOLambdaCall -> !(Maybe Expression)
[_hoLambdaParams] :: HOLambdaCall -> !LambdaParameters
[_hoLambdaStatements] :: HOLambdaCall -> !(Vector Statement)
[_hoLambdaLastExpr] :: HOLambdaCall -> !(Maybe Expression)
data ChainableRes
ChainResColl :: !ResCollDecl -> ChainableRes
ChainResDecl :: !ResDecl -> ChainableRes
ChainResRefr :: !Text -> [Expression] -> !PPosition -> ChainableRes
class HasHOLambdaCall c_a10oO where hoLambdaExpr = (.) hOLambdaCall hoLambdaExpr hoLambdaFunc = (.) hOLambdaCall hoLambdaFunc hoLambdaLastExpr = (.) hOLambdaCall hoLambdaLastExpr hoLambdaParams = (.) hOLambdaCall hoLambdaParams hoLambdaStatements = (.) hOLambdaCall hoLambdaStatements
hOLambdaCall :: HasHOLambdaCall c_a10oO => Lens' c_a10oO HOLambdaCall
hoLambdaExpr :: HasHOLambdaCall c_a10oO => Lens' c_a10oO (Maybe Expression)
hoLambdaFunc :: HasHOLambdaCall c_a10oO => Lens' c_a10oO LambdaFunc
hoLambdaLastExpr :: HasHOLambdaCall c_a10oO => Lens' c_a10oO (Maybe Expression)
hoLambdaParams :: HasHOLambdaCall c_a10oO => Lens' c_a10oO LambdaParameters
hoLambdaStatements :: HasHOLambdaCall c_a10oO => Lens' c_a10oO (Vector Statement)

-- | Lambda block parameters: Currently only two types of block parameters
--   are supported: single values and pairs.
data LambdaParameters

-- | <pre>
--   |k|
--   </pre>
BPSingle :: !Text -> LambdaParameters

-- | <pre>
--   |k,v|
--   </pre>
BPPair :: !Text -> !Text -> LambdaParameters
data CompRegex
CompRegex :: !Text -> !Regex -> CompRegex
data CollectorType
Collector :: CollectorType
ExportedCollector :: CollectorType
data Virtuality

-- | Normal resource, that will be included in the catalog
Normal :: Virtuality

-- | Type for virtual resources
Virtual :: Virtuality

-- | Type for exported resources
Exported :: Virtuality

-- | These are resources that are exported AND included in the
--   catalogderiving (Generic, Eq, Show)
ExportedRealized :: Virtuality
data NodeDesc
NodeName :: !Text -> NodeDesc
NodeMatch :: !CompRegex -> NodeDesc
NodeDefault :: NodeDesc

-- | Relationship link type.
data LinkType
RNotify :: LinkType
RRequire :: LinkType
RBefore :: LinkType
RSubscribe :: LinkType
data DataType
DTType :: DataType
DTString :: (Maybe Int) -> (Maybe Int) -> DataType
DTInteger :: (Maybe Int) -> (Maybe Int) -> DataType
DTFloat :: (Maybe Double) -> (Maybe Double) -> DataType
DTBoolean :: DataType
DTArray :: DataType -> Int -> (Maybe Int) -> DataType
DTHash :: DataType -> DataType -> Int -> (Maybe Int) -> DataType
DTUndef :: DataType
DTScalar :: DataType
DTData :: DataType
DTOptional :: DataType -> DataType
NotUndef :: DataType
DTVariant :: (NonEmpty DataType) -> DataType
DTPattern :: (NonEmpty CompRegex) -> DataType
DTEnum :: (NonEmpty Text) -> DataType
DTAny :: DataType
DTCollection :: DataType

-- | Search expression inside collector `<a>searchexpr |</a>`
data SearchExpression
EqualitySearch :: !Text -> !Expression -> SearchExpression
NonEqualitySearch :: !Text -> !Expression -> SearchExpression
AndSearch :: !SearchExpression -> !SearchExpression -> SearchExpression
OrSearch :: !SearchExpression -> !SearchExpression -> SearchExpression
AlwaysTrue :: SearchExpression
data ArrowOp

-- | <tt>+&gt;</tt>
AppendArrow :: ArrowOp

-- | `=&gt;`
AssignArrow :: ArrowOp
data AttributeDecl
AttributeDecl :: !Text -> !ArrowOp -> !Expression -> AttributeDecl

-- | All types of conditional statements (<tt>case</tt>, <tt>if</tt>, etc.)
--   are stored as an ordered list of pair (condition, statements)
--   (interpreted as "if first cond is true, choose first statements, else
--   take the next pair, check the condition ...")
data ConditionalDecl
ConditionalDecl :: !(Vector (Pair Expression (Vector Statement))) -> !PPosition -> ConditionalDecl
data ClassDecl
ClassDecl :: !Text -> !(Vector (Pair (Pair Text (Maybe DataType)) (Maybe Expression))) -> !(Maybe Text) -> !(Vector Statement) -> !PPosition -> ClassDecl

-- | Resource default: e.g `File { mode =&gt; 755 }`
--   <a>https://docs.puppetlabs.com/puppet/latest/reference/lang_defaults.html#language:-resource-default-statements</a>
data ResDefaultDecl
ResDefaultDecl :: !Text -> !(Vector AttributeDecl) -> !PPosition -> ResDefaultDecl
data DepDecl
DepDecl :: !(Pair Text Expression) -> !(Pair Text Expression) -> !LinkType -> !PPosition -> DepDecl

-- | All the possible statements
data Statement
ResourceDeclaration :: !ResDecl -> Statement
ResourceDefaultDeclaration :: !ResDefaultDecl -> Statement
ResourceOverrideDeclaration :: !ResOverrideDecl -> Statement
ResourceCollectionDeclaration :: !ResCollDecl -> Statement
ClassDeclaration :: !ClassDecl -> Statement
DefineDeclaration :: !DefineDecl -> Statement
NodeDeclaration :: !NodeDecl -> Statement
ConditionalDeclaration :: !ConditionalDecl -> Statement
VarAssignmentDeclaration :: !VarAssignDecl -> Statement
MainFunctionDeclaration :: !MainFuncDecl -> Statement
HigherOrderLambdaDeclaration :: !HigherOrderLambdaDecl -> Statement
DependencyDeclaration :: !DepDecl -> Statement

-- | Special statement used to include the expressions that are top level.
--   Certainly buggy, but probably just like the original implementation.
TopContainer :: !(Vector Statement) -> !Statement -> Statement

-- | Resource declaration: e.g `file { mode =&gt; 755}`
data ResDecl
ResDecl :: !Text -> !Expression -> !(Vector AttributeDecl) -> !Virtuality -> !PPosition -> ResDecl

-- | Resource override: e.g `File[<tt>title</tt>] { mode =&gt; 755}`
--   <a>https://docs.puppetlabs.com/puppet/latest/reference/lang_resources_advanced.html#amending-attributes-with-a-resource-reference</a>
data ResOverrideDecl
ResOverrideDecl :: !Text -> !Expression -> !(Vector AttributeDecl) -> !PPosition -> ResOverrideDecl
data DefineDecl
DefineDecl :: !Text -> !(Vector (Pair (Pair Text (Maybe DataType)) (Maybe Expression))) -> !(Vector Statement) -> !PPosition -> DefineDecl

-- | A node is a collection of statements + maybe an inherit node
data NodeDecl
NodeDecl :: !NodeDesc -> !(Vector Statement) -> !(Maybe NodeDesc) -> !PPosition -> NodeDecl

-- | e.g $newvar = <tt>world</tt>
data VarAssignDecl
VarAssignDecl :: !Text -> !Expression -> !PPosition -> VarAssignDecl
data MainFuncDecl
MainFuncDecl :: !Text -> !(Vector Expression) -> !PPosition -> MainFuncDecl

-- | <i>Higher order function</i> call.
data HigherOrderLambdaDecl
HigherOrderLambdaDecl :: !HOLambdaCall -> !PPosition -> HigherOrderLambdaDecl

-- | Resource Collector including exported collector (` `) e.g `User
--   <a>title == 'jenkins' |</a> { groups +&gt; "docker"}`
--   <a>https://docs.puppetlabs.com/puppet/latest/reference/lang_collectors.html#language:-resource-collectors</a>
data ResCollDecl
ResCollDecl :: !CollectorType -> !Text -> !SearchExpression -> !(Vector AttributeDecl) -> !PPosition -> ResCollDecl
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Parser.Types.DataType
instance Puppet.Parser.Types.HasHOLambdaCall Puppet.Parser.Types.HOLambdaCall
instance GHC.Classes.Eq Puppet.Parser.Types.ChainableRes
instance GHC.Show.Show Puppet.Parser.Types.ChainableRes
instance GHC.Show.Show Puppet.Parser.Types.ResDecl
instance GHC.Classes.Eq Puppet.Parser.Types.ResDecl
instance GHC.Show.Show Puppet.Parser.Types.ResDefaultDecl
instance GHC.Classes.Eq Puppet.Parser.Types.ResDefaultDecl
instance GHC.Show.Show Puppet.Parser.Types.ResOverrideDecl
instance GHC.Classes.Eq Puppet.Parser.Types.ResOverrideDecl
instance GHC.Show.Show Puppet.Parser.Types.ConditionalDecl
instance GHC.Classes.Eq Puppet.Parser.Types.ConditionalDecl
instance GHC.Show.Show Puppet.Parser.Types.ClassDecl
instance GHC.Classes.Eq Puppet.Parser.Types.ClassDecl
instance GHC.Show.Show Puppet.Parser.Types.DefineDecl
instance GHC.Classes.Eq Puppet.Parser.Types.DefineDecl
instance GHC.Show.Show Puppet.Parser.Types.NodeDecl
instance GHC.Classes.Eq Puppet.Parser.Types.NodeDecl
instance GHC.Show.Show Puppet.Parser.Types.VarAssignDecl
instance GHC.Classes.Eq Puppet.Parser.Types.VarAssignDecl
instance GHC.Show.Show Puppet.Parser.Types.MainFuncDecl
instance GHC.Classes.Eq Puppet.Parser.Types.MainFuncDecl
instance GHC.Show.Show Puppet.Parser.Types.HigherOrderLambdaDecl
instance GHC.Classes.Eq Puppet.Parser.Types.HigherOrderLambdaDecl
instance GHC.Classes.Eq Puppet.Parser.Types.AttributeDecl
instance GHC.Show.Show Puppet.Parser.Types.AttributeDecl
instance GHC.Show.Show Puppet.Parser.Types.SearchExpression
instance GHC.Classes.Eq Puppet.Parser.Types.SearchExpression
instance GHC.Show.Show Puppet.Parser.Types.ResCollDecl
instance GHC.Classes.Eq Puppet.Parser.Types.ResCollDecl
instance GHC.Show.Show Puppet.Parser.Types.HOLambdaCall
instance GHC.Classes.Eq Puppet.Parser.Types.HOLambdaCall
instance GHC.Classes.Eq Puppet.Parser.Types.UnresolvedValue
instance GHC.Show.Show Puppet.Parser.Types.UnresolvedValue
instance GHC.Show.Show Puppet.Parser.Types.SelectorCase
instance GHC.Classes.Eq Puppet.Parser.Types.SelectorCase
instance GHC.Show.Show Puppet.Parser.Types.Expression
instance GHC.Classes.Eq Puppet.Parser.Types.Expression
instance GHC.Show.Show Puppet.Parser.Types.DepDecl
instance GHC.Classes.Eq Puppet.Parser.Types.DepDecl
instance GHC.Show.Show Puppet.Parser.Types.Statement
instance GHC.Classes.Eq Puppet.Parser.Types.Statement
instance GHC.Generics.Generic Puppet.Parser.Types.LinkType
instance GHC.Classes.Eq Puppet.Parser.Types.LinkType
instance GHC.Show.Show Puppet.Parser.Types.LinkType
instance GHC.Classes.Eq Puppet.Parser.Types.NodeDesc
instance GHC.Show.Show Puppet.Parser.Types.NodeDesc
instance GHC.Show.Show Puppet.Parser.Types.Virtuality
instance GHC.Classes.Eq Puppet.Parser.Types.Virtuality
instance GHC.Show.Show Puppet.Parser.Types.CollectorType
instance GHC.Classes.Eq Puppet.Parser.Types.CollectorType
instance GHC.Show.Show Puppet.Parser.Types.DataType
instance GHC.Classes.Eq Puppet.Parser.Types.DataType
instance GHC.Classes.Eq Puppet.Parser.Types.ArrowOp
instance GHC.Show.Show Puppet.Parser.Types.ArrowOp
instance GHC.Show.Show Puppet.Parser.Types.LambdaParameters
instance GHC.Classes.Eq Puppet.Parser.Types.LambdaParameters
instance GHC.Show.Show Puppet.Parser.Types.LambdaFunc
instance GHC.Classes.Eq Puppet.Parser.Types.LambdaFunc
instance GHC.Show.Show Puppet.Parser.Types.CompRegex
instance GHC.Classes.Eq Puppet.Parser.Types.CompRegex
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Parser.Types.CompRegex
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Parser.Types.CompRegex
instance GHC.Exts.IsList Puppet.Parser.Types.UnresolvedValue
instance Data.String.IsString Puppet.Parser.Types.UnresolvedValue
instance GHC.Exts.IsList Puppet.Parser.Types.Expression
instance GHC.Num.Num Puppet.Parser.Types.Expression
instance GHC.Real.Fractional Puppet.Parser.Types.Expression
instance Data.String.IsString Puppet.Parser.Types.Expression
instance Data.Hashable.Class.Hashable Puppet.Parser.Types.LinkType
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Parser.Types.LinkType
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Parser.Types.LinkType


-- | Parse puppet source code from text.
module Puppet.Parser

-- | Run a puppet parser against some <a>Text</a> input.
runPParser :: String -> Text -> Either (ParseError Char Dec) (Vector Statement)

-- | Parse a collection of puppet <a>Statement</a>.
puppetParser :: Parser (Vector Statement)

-- | Parse a puppet <a>Expression</a>.
expression :: Parser Expression
datatype :: Parser DataType
instance Data.Foldable.Foldable Puppet.Parser.OperatorChain

module Puppet.PP
ttext :: Text -> Doc
prettyToText :: Doc -> Text

-- | A rendering function that drops colors:
displayNocolor :: Doc -> String

module Puppet.Parser.PrettyPrinter
capitalize :: Text -> Doc
parensList :: Pretty a => Vector a -> Doc
hashComma :: (Pretty a, Pretty b) => Vector (Pair a b) -> Doc
stringEscape :: Text -> Text
showPos :: Position -> Doc
showPPos :: PPosition -> Doc
showAss :: Vector AttributeDecl -> Doc
showArgs :: Vector (Pair (Pair Text (Maybe DataType)) (Maybe Expression)) -> Doc
showFunc :: Text -> Vector Expression -> Doc
braceStatements :: Vector Statement -> Doc
ppStatements :: Vector Statement -> Doc
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.DataType
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.Expression
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.LambdaFunc
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.LambdaParameters
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.SearchExpression
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.UnresolvedValue
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.CompRegex
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.HOLambdaCall
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.SelectorCase
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.LinkType
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.ArrowOp
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.NodeDesc
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Parser.Types.Statement

module Puppet.Interpreter.Types
class HasResource c_a69gH where ralias = (.) resource ralias rattributes = (.) resource rattributes rid = (.) resource rid rnode = (.) resource rnode rpos = (.) resource rpos rrelations = (.) resource rrelations rscope = (.) resource rscope rtags = (.) resource rtags rvirtuality = (.) resource rvirtuality
resource :: HasResource c_a69gH => Lens' c_a69gH Resource
ralias :: HasResource c_a69gH => Lens' c_a69gH (HashSet Text)
rattributes :: HasResource c_a69gH => Lens' c_a69gH (Container PValue)
rid :: HasResource c_a69gH => Lens' c_a69gH RIdentifier
rnode :: HasResource c_a69gH => Lens' c_a69gH NodeName
rpos :: HasResource c_a69gH => Lens' c_a69gH PPosition
rrelations :: HasResource c_a69gH => Lens' c_a69gH (HashMap RIdentifier (HashSet LinkType))
rscope :: HasResource c_a69gH => Lens' c_a69gH [CurContainerDesc]
rtags :: HasResource c_a69gH => Lens' c_a69gH (HashSet Text)
rvirtuality :: HasResource c_a69gH => Lens' c_a69gH Virtuality

-- | A fully resolved puppet resource that will be used in the
--   <a>FinalCatalog</a>.
data Resource
Resource :: !RIdentifier -> !(HashSet Text) -> !(Container PValue) -> !(HashMap RIdentifier (HashSet LinkType)) -> ![CurContainerDesc] -> !Virtuality -> !(HashSet Text) -> !PPosition -> !NodeName -> Resource
class HasResDefaults c_a68Zn where resDefPos = (.) resDefaults resDefPos resDefSrcScope = (.) resDefaults resDefSrcScope resDefType = (.) resDefaults resDefType resDefValues = (.) resDefaults resDefValues
resDefaults :: HasResDefaults c_a68Zn => Lens' c_a68Zn ResDefaults
resDefPos :: HasResDefaults c_a68Zn => Lens' c_a68Zn PPosition
resDefSrcScope :: HasResDefaults c_a68Zn => Lens' c_a68Zn Text
resDefType :: HasResDefaults c_a68Zn => Lens' c_a68Zn Text
resDefValues :: HasResDefaults c_a68Zn => Lens' c_a68Zn (Container PValue)

-- | From the evaluation of Resource Default Declaration
data ResDefaults
ResDefaults :: !Text -> !Text -> !(Container PValue) -> !PPosition -> ResDefaults
class HasLinkInformation c_a68Vx where linkPos = (.) linkInformation linkPos linkType = (.) linkInformation linkType linkdst = (.) linkInformation linkdst linksrc = (.) linkInformation linksrc
linkInformation :: HasLinkInformation c_a68Vx => Lens' c_a68Vx LinkInformation
linkPos :: HasLinkInformation c_a68Vx => Lens' c_a68Vx PPosition
linkType :: HasLinkInformation c_a68Vx => Lens' c_a68Vx LinkType
linkdst :: HasLinkInformation c_a68Vx => Lens' c_a68Vx RIdentifier
linksrc :: HasLinkInformation c_a68Vx => Lens' c_a68Vx RIdentifier
data LinkInformation
LinkInformation :: !RIdentifier -> !RIdentifier -> !LinkType -> !PPosition -> LinkInformation
class HasRIdentifier c_a68Ql where iname = (.) rIdentifier iname itype = (.) rIdentifier itype
rIdentifier :: HasRIdentifier c_a68Ql => Lens' c_a68Ql RIdentifier
iname :: HasRIdentifier c_a68Ql => Lens' c_a68Ql Text
itype :: HasRIdentifier c_a68Ql => Lens' c_a68Ql Text
data RIdentifier
RIdentifier :: !Text -> !Text -> RIdentifier
class HasScopeInformation c_a69b5 where scopeContainer = (.) scopeInformation scopeContainer scopeExtraTags = (.) scopeInformation scopeExtraTags scopeOverrides = (.) scopeInformation scopeOverrides scopeParent = (.) scopeInformation scopeParent scopeResDefaults = (.) scopeInformation scopeResDefaults scopeVariables = (.) scopeInformation scopeVariables
scopeInformation :: HasScopeInformation c_a69b5 => Lens' c_a69b5 ScopeInformation
scopeContainer :: HasScopeInformation c_a69b5 => Lens' c_a69b5 CurContainer
scopeExtraTags :: HasScopeInformation c_a69b5 => Lens' c_a69b5 (HashSet Text)
scopeOverrides :: HasScopeInformation c_a69b5 => Lens' c_a69b5 (HashMap RIdentifier ResRefOverride)
scopeParent :: HasScopeInformation c_a69b5 => Lens' c_a69b5 (Maybe Text)
scopeResDefaults :: HasScopeInformation c_a69b5 => Lens' c_a69b5 (Container ResDefaults)
scopeVariables :: HasScopeInformation c_a69b5 => Lens' c_a69b5 (Container (Pair (Pair PValue PPosition) CurContainerDesc))
data ScopeInformation
ScopeInformation :: !(Container (Pair (Pair PValue PPosition) CurContainerDesc)) -> !(Container ResDefaults) -> !(HashSet Text) -> !CurContainer -> !(HashMap RIdentifier ResRefOverride) -> !(Maybe Text) -> ScopeInformation
data ScopeEnteringContext
SENormal :: ScopeEnteringContext

-- | We enter the scope as the child of another class
SEChild :: !Text -> ScopeEnteringContext

-- | We enter the scope as the parent of another class
SEParent :: !Text -> ScopeEnteringContext
class HasResourceModifier c_a693d where rmDeclaration = (.) resourceModifier rmDeclaration rmModifierType = (.) resourceModifier rmModifierType rmMutation = (.) resourceModifier rmMutation rmResType = (.) resourceModifier rmResType rmSearch = (.) resourceModifier rmSearch rmType = (.) resourceModifier rmType
resourceModifier :: HasResourceModifier c_a693d => Lens' c_a693d ResourceModifier
rmDeclaration :: HasResourceModifier c_a693d => Lens' c_a693d PPosition
rmModifierType :: HasResourceModifier c_a693d => Lens' c_a693d ModifierType
rmMutation :: HasResourceModifier c_a693d => Lens' c_a693d (Resource -> InterpreterMonad Resource)
rmResType :: HasResourceModifier c_a693d => Lens' c_a693d Text
rmSearch :: HasResourceModifier c_a693d => Lens' c_a693d RSearchExpression
rmType :: HasResourceModifier c_a693d => Lens' c_a693d ResourceCollectorType
data ResourceModifier
ResourceModifier :: !Text -> !ModifierType -> !ResourceCollectorType -> !RSearchExpression -> !(Resource -> InterpreterMonad Resource) -> !PPosition -> ResourceModifier
class HasIoMethods c_a69JT m_a67Mn | c_a69JT -> m_a67Mn where ioGetCurrentCallStack = (.) ioMethods ioGetCurrentCallStack ioReadFile = (.) ioMethods ioReadFile ioTraceEvent = (.) ioMethods ioTraceEvent
ioMethods :: HasIoMethods c_a69JT m_a67Mn => Lens' c_a69JT (IoMethods m_a67Mn)
ioGetCurrentCallStack :: HasIoMethods c_a69JT m_a67Mn => Lens' c_a69JT (m_a67Mn [String])
ioReadFile :: HasIoMethods c_a69JT m_a67Mn => Lens' c_a69JT ([Text] -> m_a67Mn (Either String Text))
ioTraceEvent :: HasIoMethods c_a69JT m_a67Mn => Lens' c_a69JT (String -> m_a67Mn ())
data IoMethods m
IoMethods :: m [String] -> ([Text] -> m (Either String Text)) -> (String -> m ()) -> IoMethods m
class HasCurContainer c_a69Nm where cctags = (.) curContainer cctags cctype = (.) curContainer cctype
curContainer :: HasCurContainer c_a69Nm => Lens' c_a69Nm CurContainer
cctags :: HasCurContainer c_a69Nm => Lens' c_a69Nm (HashSet Text)
cctype :: HasCurContainer c_a69Nm => Lens' c_a69Nm CurContainerDesc

-- | TODO related to Scope: explain ...
data CurContainer
CurContainer :: !CurContainerDesc -> !(HashSet Text) -> CurContainer
class HasNativeTypeMethods c_a698T where puppetFields = (.) nativeTypeMethods puppetFields puppetValidate = (.) nativeTypeMethods puppetValidate
nativeTypeMethods :: HasNativeTypeMethods c_a698T => Lens' c_a698T NativeTypeMethods
puppetFields :: HasNativeTypeMethods c_a698T => Lens' c_a698T (HashSet Text)
puppetValidate :: HasNativeTypeMethods c_a698T => Lens' c_a698T NativeTypeValidate

-- | Attributes (and providers) of a puppet resource type bundled with
--   validation rules
data NativeTypeMethods
NativeTypeMethods :: NativeTypeValidate -> HashSet Text -> NativeTypeMethods
data NodeInfo
NodeInfo :: !NodeName -> !Bool -> !(Maybe UTCTime) -> !(Maybe UTCTime) -> !(Maybe UTCTime) -> NodeInfo
class HasNodeInfo c_a69Py where nodeInfoCatalogT = (.) nodeInfo nodeInfoCatalogT nodeInfoDeactivated = (.) nodeInfo nodeInfoDeactivated nodeInfoFactsT = (.) nodeInfo nodeInfoFactsT nodeInfoName = (.) nodeInfo nodeInfoName nodeInfoReportT = (.) nodeInfo nodeInfoReportT
nodeInfo :: HasNodeInfo c_a69Py => Lens' c_a69Py NodeInfo
nodeInfoCatalogT :: HasNodeInfo c_a69Py => Lens' c_a69Py (Maybe UTCTime)
nodeInfoDeactivated :: HasNodeInfo c_a69Py => Lens' c_a69Py Bool
nodeInfoFactsT :: HasNodeInfo c_a69Py => Lens' c_a69Py (Maybe UTCTime)
nodeInfoName :: HasNodeInfo c_a69Py => Lens' c_a69Py NodeName
nodeInfoReportT :: HasNodeInfo c_a69Py => Lens' c_a69Py (Maybe UTCTime)
data FactInfo
FactInfo :: !NodeName -> !Text -> !PValue -> FactInfo
class HasFactInfo c_a69YY where factInfoName = (.) factInfo factInfoName factInfoNodename = (.) factInfo factInfoNodename factInfoVal = (.) factInfo factInfoVal
factInfo :: HasFactInfo c_a69YY => Lens' c_a69YY FactInfo
factInfoName :: HasFactInfo c_a69YY => Lens' c_a69YY Text
factInfoNodename :: HasFactInfo c_a69YY => Lens' c_a69YY NodeName
factInfoVal :: HasFactInfo c_a69YY => Lens' c_a69YY PValue
class HasWireCatalog c_a69Ug where wireCatalogEdges = (.) wireCatalog wireCatalogEdges wireCatalogNodename = (.) wireCatalog wireCatalogNodename wireCatalogResources = (.) wireCatalog wireCatalogResources wireCatalogTransactionUUID = (.) wireCatalog wireCatalogTransactionUUID wireCatalogVersion = (.) wireCatalog wireCatalogVersion
wireCatalog :: HasWireCatalog c_a69Ug => Lens' c_a69Ug WireCatalog
wireCatalogEdges :: HasWireCatalog c_a69Ug => Lens' c_a69Ug (Vector PuppetEdge)
wireCatalogNodename :: HasWireCatalog c_a69Ug => Lens' c_a69Ug NodeName
wireCatalogResources :: HasWireCatalog c_a69Ug => Lens' c_a69Ug (Vector Resource)
wireCatalogTransactionUUID :: HasWireCatalog c_a69Ug => Lens' c_a69Ug Text
wireCatalogVersion :: HasWireCatalog c_a69Ug => Lens' c_a69Ug Text
data InterpreterInstr a
[GetNativeTypes] :: InterpreterInstr (Container NativeTypeMethods)
[GetStatement] :: TopLevelType -> Text -> InterpreterInstr Statement
[ComputeTemplate] :: Either Text Text -> InterpreterState -> InterpreterInstr Text
[ExternalFunction] :: Text -> [PValue] -> InterpreterInstr PValue
[GetNodeName] :: InterpreterInstr Text
[HieraQuery] :: Container Text -> Text -> HieraQueryType -> InterpreterInstr (Maybe PValue)
[GetCurrentCallStack] :: InterpreterInstr [String]
[IsIgnoredModule] :: Text -> InterpreterInstr Bool
[IsExternalModule] :: Text -> InterpreterInstr Bool
[IsStrict] :: InterpreterInstr Bool
[PuppetPaths] :: InterpreterInstr PuppetDirPaths
[ErrorThrow] :: PrettyError -> InterpreterInstr a
[ErrorCatch] :: InterpreterMonad a -> (PrettyError -> InterpreterMonad a) -> InterpreterInstr a
[WriterTell] :: InterpreterWriter -> InterpreterInstr ()
[WriterPass] :: InterpreterMonad (a, InterpreterWriter -> InterpreterWriter) -> InterpreterInstr a
[WriterListen] :: InterpreterMonad a -> InterpreterInstr (a, InterpreterWriter)
[PDBInformation] :: InterpreterInstr Doc
[PDBReplaceCatalog] :: WireCatalog -> InterpreterInstr ()
[PDBReplaceFacts] :: [(NodeName, Facts)] -> InterpreterInstr ()
[PDBDeactivateNode] :: NodeName -> InterpreterInstr ()
[PDBGetFacts] :: Query FactField -> InterpreterInstr [FactInfo]
[PDBGetResources] :: Query ResourceField -> InterpreterInstr [Resource]
[PDBGetNodes] :: Query NodeField -> InterpreterInstr [NodeInfo]
[PDBCommitDB] :: InterpreterInstr ()
[PDBGetResourcesOfNode] :: NodeName -> Query ResourceField -> InterpreterInstr [Resource]
[ReadFile] :: [Text] -> InterpreterInstr Text
[TraceEvent] :: String -> InterpreterInstr ()
class HasInterpreterReader c_a69wJ m_a67Mo | c_a69wJ -> m_a67Mo where readerExternalFunc = (.) interpreterReader readerExternalFunc readerExternalModules = (.) interpreterReader readerExternalModules readerGetStatement = (.) interpreterReader readerGetStatement readerGetTemplate = (.) interpreterReader readerGetTemplate readerHieraQuery = (.) interpreterReader readerHieraQuery readerIgnoredModules = (.) interpreterReader readerIgnoredModules readerIoMethods = (.) interpreterReader readerIoMethods readerIsStrict = (.) interpreterReader readerIsStrict readerNativeTypes = (.) interpreterReader readerNativeTypes readerNodename = (.) interpreterReader readerNodename readerPdbApi = (.) interpreterReader readerPdbApi readerPuppetPaths = (.) interpreterReader readerPuppetPaths
interpreterReader :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (InterpreterReader m_a67Mo)
readerExternalFunc :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (Container ([PValue] -> InterpreterMonad PValue))
readerExternalModules :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (HashSet Text)
readerGetStatement :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (TopLevelType -> Text -> m_a67Mo (Either PrettyError Statement))
readerGetTemplate :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (Either Text Text -> InterpreterState -> InterpreterReader m_a67Mo -> m_a67Mo (Either PrettyError Text))
readerHieraQuery :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (HieraQueryFunc m_a67Mo)
readerIgnoredModules :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (HashSet Text)
readerIoMethods :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (IoMethods m_a67Mo)
readerIsStrict :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ Bool
readerNativeTypes :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (Container NativeTypeMethods)
readerNodename :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ Text
readerPdbApi :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ (PuppetDBAPI m_a67Mo)
readerPuppetPaths :: HasInterpreterReader c_a69wJ m_a67Mo => Lens' c_a69wJ PuppetDirPaths
data InterpreterReader m
InterpreterReader :: !(Container NativeTypeMethods) -> (TopLevelType -> Text -> m (Either PrettyError Statement)) -> (Either Text Text -> InterpreterState -> InterpreterReader m -> m (Either PrettyError Text)) -> PuppetDBAPI m -> Container ([PValue] -> InterpreterMonad PValue) -> Text -> HieraQueryFunc m -> IoMethods m -> HashSet Text -> HashSet Text -> Bool -> PuppetDirPaths -> InterpreterReader m
class HasInterpreterState c_a69pd where curPos = (.) interpreterState curPos curScope = (.) interpreterState curScope definedResources = (.) interpreterState definedResources extraRelations = (.) interpreterState extraRelations loadedClasses = (.) interpreterState loadedClasses nestedDeclarations = (.) interpreterState nestedDeclarations resMod = (.) interpreterState resMod scopes = (.) interpreterState scopes
interpreterState :: HasInterpreterState c_a69pd => Lens' c_a69pd InterpreterState
curPos :: HasInterpreterState c_a69pd => Lens' c_a69pd PPosition
curScope :: HasInterpreterState c_a69pd => Lens' c_a69pd [CurContainerDesc]
definedResources :: HasInterpreterState c_a69pd => Lens' c_a69pd (HashMap RIdentifier Resource)
extraRelations :: HasInterpreterState c_a69pd => Lens' c_a69pd [LinkInformation]
loadedClasses :: HasInterpreterState c_a69pd => Lens' c_a69pd (Container (Pair ClassIncludeType PPosition))
nestedDeclarations :: HasInterpreterState c_a69pd => Lens' c_a69pd (HashMap (TopLevelType, Text) Statement)
resMod :: HasInterpreterState c_a69pd => Lens' c_a69pd [ResourceModifier]
scopes :: HasInterpreterState c_a69pd => Lens' c_a69pd (Container ScopeInformation)
data InterpreterState
InterpreterState :: !(Container ScopeInformation) -> !(Container (Pair ClassIncludeType PPosition)) -> !(HashMap RIdentifier Resource) -> ![CurContainerDesc] -> !PPosition -> !(HashMap (TopLevelType, Text) Statement) -> ![LinkInformation] -> ![ResourceModifier] -> InterpreterState
data PValue
PBoolean :: !Bool -> PValue
PUndef :: PValue
PString :: !Text -> PValue
PResourceReference :: !Text -> !Text -> PValue
PArray :: !(Vector PValue) -> PValue
PHash :: !(Container PValue) -> PValue
PNumber :: !Scientific -> PValue
PType :: DataType -> PValue
_PType :: Prism' PValue DataType
_PBoolean :: Prism' PValue Bool
_PString :: Prism' PValue Text
_PResourceReference :: Prism' PValue (Text, Text)
_PArray :: Prism' PValue (Vector PValue)
_PHash :: Prism' PValue (Container PValue)
_PNumber :: Prism' PValue Scientific
_PUndef :: Prism' PValue ()
data CurContainerDesc

-- | Contained at node or root level
ContRoot :: CurContainerDesc

-- | Contained in a class
ContClass :: !Text -> CurContainerDesc

-- | Contained in a define, along with the position where this define was
--   ... defined
ContDefine :: !Text -> !Text -> !PPosition -> CurContainerDesc

-- | Dummy container for imported resources, so that we know we must update
--   the nodename
ContImported :: !CurContainerDesc -> CurContainerDesc

-- | This one is used when finalizing imported resources, and contains the
--   current node name
ContImport :: !NodeName -> !CurContainerDesc -> CurContainerDesc
data ResourceCollectorType
RealizeVirtual :: ResourceCollectorType
RealizeCollected :: ResourceCollectorType
DontRealize :: ResourceCollectorType
data RSearchExpression
REqualitySearch :: !Text -> !PValue -> RSearchExpression
RNonEqualitySearch :: !Text -> !PValue -> RSearchExpression
RAndSearch :: !RSearchExpression -> !RSearchExpression -> RSearchExpression
ROrSearch :: !RSearchExpression -> !RSearchExpression -> RSearchExpression
RAlwaysTrue :: RSearchExpression

-- | Pretty straightforward way to define the various PuppetDB queries
data Query a
QEqual :: a -> Text -> Query a
QG :: a -> Integer -> Query a
QL :: a -> Integer -> Query a
QGE :: a -> Integer -> Query a
QLE :: a -> Integer -> Query a
QMatch :: Text -> Text -> Query a
QAnd :: [Query a] -> Query a
QOr :: [Query a] -> Query a
QNot :: (Query a) -> Query a
QEmpty :: Query a
data ModifierType

-- | For collectors, optional resources
ModifierCollector :: ModifierType

-- | For stuff like realize
ModifierMustMatch :: ModifierType

-- | Fields for the node endpoint
data NodeField

-- | The intepreter can run in two modes : a strict mode (recommended), and
--   a permissive mode. The permissive mode let known antipatterns work
--   with the interpreter.
data Strictness
Strict :: Strictness
Permissive :: Strictness

-- | The different kind of hiera queries
data HieraQueryType

-- | standard hiera query
Priority :: HieraQueryType

-- | hiera_array
ArrayMerge :: HieraQueryType

-- | hiera_hash
HashMerge :: HieraQueryType

-- | Wire format, see
--   <a>http://docs.puppetlabs.com/puppetdb/1.5/api/wire_format/catalog_format.html</a>.
data WireCatalog
WireCatalog :: !NodeName -> !Text -> !(Vector PuppetEdge) -> !(Vector Resource) -> !Text -> WireCatalog
[_wireCatalogNodename] :: WireCatalog -> !NodeName
[_wireCatalogVersion] :: WireCatalog -> !Text
[_wireCatalogEdges] :: WireCatalog -> !(Vector PuppetEdge)
[_wireCatalogResources] :: WireCatalog -> !(Vector Resource)
[_wireCatalogTransactionUUID] :: WireCatalog -> !Text

-- | This type is used to differenciate the distinct top level types that
--   are exposed by the DSL.
data TopLevelType

-- | This is for node entries.
TopNode :: TopLevelType

-- | This is for defines.
TopDefine :: TopLevelType

-- | This is for classes.
TopClass :: TopLevelType

-- | Fields for the fact endpoint
data FactField
FName :: FactField
FValue :: FactField
FCertname :: FactField

-- | From the evaluation of Resource Override Declaration
data ResRefOverride
ResRefOverride :: !RIdentifier -> !(Container PValue) -> !PPosition -> ResRefOverride
[_rrid] :: ResRefOverride -> !RIdentifier
[_rrparams] :: ResRefOverride -> !(Container PValue)
[_rrpos] :: ResRefOverride -> !PPosition

-- | Fields for the resource endpoint
data ResourceField
RTag :: ResourceField
RCertname :: ResourceField
RParameter :: Text -> ResourceField
RType :: ResourceField
RTitle :: ResourceField
RExported :: ResourceField
RFile :: ResourceField
RLine :: ResourceField
data OverrideType

-- | Overriding forbidden, will throw an error
CantOverride :: OverrideType

-- | Can silently replace
Replace :: OverrideType

-- | Silently ignore errors
CantReplace :: OverrideType

-- | Can append values
AppendAttribute :: OverrideType

-- | Puppet has two main ways to declare classes: include-like and
--   resource-like
--   <a>https://docs.puppetlabs.com/puppet/latest/reference/lang_classes.html#include-like-vs-resource-like</a>
data ClassIncludeType

-- | using the include or contain function
ClassIncludeLike :: ClassIncludeType

-- | resource like declaration
ClassResourceLike :: ClassIncludeType

-- | Used to represent a relationship between two resources within the
--   wired format (json). See
--   <a>http://docs.puppetlabs.com/puppetdb/2.3/api/wire_format/catalog_format_v5.html#data-type-edge</a>
data PuppetEdge
PuppetEdge :: RIdentifier -> RIdentifier -> LinkType -> PuppetEdge
data PuppetDBAPI m
PuppetDBAPI :: m Doc -> (WireCatalog -> ExceptT PrettyError m ()) -> ([(NodeName, Facts)] -> ExceptT PrettyError m ()) -> (NodeName -> ExceptT PrettyError m ()) -> (Query FactField -> ExceptT PrettyError m [FactInfo]) -> (Query ResourceField -> ExceptT PrettyError m [Resource]) -> (Query NodeField -> ExceptT PrettyError m [NodeInfo]) -> ExceptT PrettyError m () -> (NodeName -> Query ResourceField -> ExceptT PrettyError m [Resource]) -> PuppetDBAPI m
[pdbInformation] :: PuppetDBAPI m -> m Doc

-- | 
--   <a>http://docs.puppetlabs.com/puppetdb/1.5/api/commands.html#replace-catalog-version-3</a>
[replaceCatalog] :: PuppetDBAPI m -> WireCatalog -> ExceptT PrettyError m ()

-- | 
--   <a>http://docs.puppetlabs.com/puppetdb/1.5/api/commands.html#replace-facts-version-1</a>
[replaceFacts] :: PuppetDBAPI m -> [(NodeName, Facts)] -> ExceptT PrettyError m ()

-- | 
--   <a>http://docs.puppetlabs.com/puppetdb/1.5/api/commands.html#deactivate-node-version-1</a>
[deactivateNode] :: PuppetDBAPI m -> NodeName -> ExceptT PrettyError m ()

-- | 
--   <a>http://docs.puppetlabs.com/puppetdb/1.5/api/query/v3/facts.html#get-v3facts</a>
[getFacts] :: PuppetDBAPI m -> Query FactField -> ExceptT PrettyError m [FactInfo]

-- | 
--   <a>http://docs.puppetlabs.com/puppetdb/1.5/api/query/v3/resources.html#get-v3resources</a>
[getResources] :: PuppetDBAPI m -> Query ResourceField -> ExceptT PrettyError m [Resource]
[getNodes] :: PuppetDBAPI m -> Query NodeField -> ExceptT PrettyError m [NodeInfo]

-- | This is only here to tell the test PuppetDB to save its content to
--   disk.
[commitDB] :: PuppetDBAPI m -> ExceptT PrettyError m ()
[getResourcesOfNode] :: PuppetDBAPI m -> NodeName -> Query ResourceField -> ExceptT PrettyError m [Resource]
newtype PrettyError
PrettyError :: Doc -> PrettyError
[getError] :: PrettyError -> Doc

-- | The main monad
type InterpreterMonad = ProgramT InterpreterInstr (State InterpreterState)

-- | Log
type InterpreterWriter = [Pair Priority Doc]
type FinalCatalog = HashMap RIdentifier Resource
type NativeTypeValidate = Resource -> Either PrettyError Resource
type NodeName = Text
type Container = HashMap Text

-- | The type of the Hiera API function
type HieraQueryFunc m = Container Text  All the variables that Hiera can interpolate, the top level ones being prefixed with :: -> Text  The query -> HieraQueryType -> m (Either PrettyError (Maybe PValue))
type Scope = Text
type Facts = Container PValue
type EdgeMap = HashMap RIdentifier [LinkInformation]
class Monad m => MonadThrowPos m
throwPosError :: MonadThrowPos m => Doc -> m a

-- | The strategy of combining computations that can throw exceptions by
--   bypassing bound functions from the point an exception is thrown to the
--   point that it is handled.
--   
--   Is parameterized over the type of error information and the monad type
--   constructor. It is common to use <tt><a>Either</a> String</tt> as the
--   monad type constructor for an error monad in which error descriptions
--   take the form of strings. In that case and many other common cases the
--   resulting monad is already defined as an instance of the
--   <a>MonadError</a> class. You can also define your own error type
--   and/or use a monad type constructor other than <tt><a>Either</a>
--   <tt>String</tt></tt> or <tt><a>Either</a> <tt>IOError</tt></tt>. In
--   these cases you will have to explicitly define instances of the
--   <a>Error</a> and/or <a>MonadError</a> classes.
class Monad m => MonadError e (m :: * -> *) | m -> e

-- | Is used within a monadic computation to begin exception processing.
throwError :: MonadError e m => e -> m a

-- | A handler function to handle previous errors and return to normal
--   execution. A common idiom is:
--   
--   <pre>
--   do { action1; action2; action3 } `catchError` handler
--   </pre>
--   
--   where the <tt>action</tt> functions can call <a>throwError</a>. Note
--   that <tt>handler</tt> and the do-block must have the same return type.
catchError :: MonadError e m => m a -> (e -> m a) -> m a
metaparameters :: HashSet Text
showPos :: Position -> Doc
instance Puppet.Interpreter.Types.MonadThrowPos (Data.Either.Either Text.PrettyPrint.ANSI.Leijen.Doc)
instance Puppet.Interpreter.Types.MonadStack Puppet.Interpreter.Types.InterpreterMonad
instance Puppet.Interpreter.Types.MonadThrowPos Puppet.Interpreter.Types.InterpreterMonad
instance Foreign.Ruby.Helpers.ToRuby Puppet.Interpreter.Types.PValue
instance Foreign.Ruby.Helpers.FromRuby Puppet.Interpreter.Types.PValue
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.PValue
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.PValue
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.Resource
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.Resource
instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Puppet.Interpreter.Types.Query a)
instance Data.Aeson.Types.ToJSON.ToJSON a => Web.Internal.HttpApiData.ToHttpApiData (Puppet.Interpreter.Types.Query a)
instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Puppet.Interpreter.Types.Query a)
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.FactField
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.FactField
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.NodeField
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.NodeField
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.ResourceField
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.ResourceField
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.RIdentifier
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.RIdentifier
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.PuppetEdge
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.PuppetEdge
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.WireCatalog
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.WireCatalog
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.FactInfo
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.FactInfo
instance Data.Aeson.Types.ToJSON.ToJSON Puppet.Interpreter.Types.NodeInfo
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.NodeInfo
instance Puppet.Interpreter.Types.HasFactInfo Puppet.Interpreter.Types.FactInfo
instance Puppet.Interpreter.Types.HasWireCatalog Puppet.Interpreter.Types.WireCatalog
instance Puppet.Interpreter.Types.HasNodeInfo Puppet.Interpreter.Types.NodeInfo
instance Puppet.Interpreter.Types.HasCurContainer Puppet.Interpreter.Types.CurContainer
instance Puppet.Interpreter.Types.HasIoMethods (Puppet.Interpreter.Types.IoMethods m0) m0
instance Puppet.Interpreter.Types.HasInterpreterReader (Puppet.Interpreter.Types.InterpreterReader m0) m0
instance Puppet.Interpreter.Types.HasInterpreterState Puppet.Interpreter.Types.InterpreterState
instance Puppet.Interpreter.Types.HasResource Puppet.Interpreter.Types.Resource
instance Puppet.Interpreter.Types.HasScopeInformation Puppet.Interpreter.Types.ScopeInformation
instance Puppet.Interpreter.Types.HasNativeTypeMethods Puppet.Interpreter.Types.NativeTypeMethods
instance Puppet.Interpreter.Types.HasResourceModifier Puppet.Interpreter.Types.ResourceModifier
instance Puppet.Interpreter.Types.HasResDefaults Puppet.Interpreter.Types.ResDefaults
instance Puppet.Interpreter.Types.HasLinkInformation Puppet.Interpreter.Types.LinkInformation
instance Puppet.Interpreter.Types.HasResRefOverride Puppet.Interpreter.Types.ResRefOverride
instance Puppet.Interpreter.Types.HasRIdentifier Puppet.Interpreter.Types.RIdentifier
instance GHC.Show.Show Puppet.Interpreter.Types.WireCatalog
instance GHC.Show.Show Puppet.Interpreter.Types.PuppetEdge
instance GHC.Show.Show Puppet.Interpreter.Types.Resource
instance GHC.Classes.Eq Puppet.Interpreter.Types.Resource
instance GHC.Show.Show Puppet.Interpreter.Types.LinkInformation
instance GHC.Classes.Eq Puppet.Interpreter.Types.ResourceCollectorType
instance GHC.Show.Show Puppet.Interpreter.Types.ResourceCollectorType
instance GHC.Classes.Eq Puppet.Interpreter.Types.OverrideType
instance GHC.Show.Show Puppet.Interpreter.Types.OverrideType
instance GHC.Classes.Eq Puppet.Interpreter.Types.ModifierType
instance GHC.Show.Show Puppet.Interpreter.Types.ModifierType
instance GHC.Classes.Eq Puppet.Interpreter.Types.ResRefOverride
instance GHC.Classes.Ord Puppet.Interpreter.Types.RIdentifier
instance GHC.Generics.Generic Puppet.Interpreter.Types.RIdentifier
instance GHC.Classes.Eq Puppet.Interpreter.Types.RIdentifier
instance GHC.Show.Show Puppet.Interpreter.Types.RIdentifier
instance GHC.Classes.Eq Puppet.Interpreter.Types.CurContainer
instance GHC.Show.Show Puppet.Interpreter.Types.CurContainerDesc
instance GHC.Classes.Ord Puppet.Interpreter.Types.CurContainerDesc
instance GHC.Generics.Generic Puppet.Interpreter.Types.CurContainerDesc
instance GHC.Classes.Eq Puppet.Interpreter.Types.CurContainerDesc
instance GHC.Classes.Eq Puppet.Interpreter.Types.TopLevelType
instance GHC.Generics.Generic Puppet.Interpreter.Types.TopLevelType
instance GHC.Classes.Eq Puppet.Interpreter.Types.ClassIncludeType
instance GHC.Classes.Eq Puppet.Interpreter.Types.RSearchExpression
instance GHC.Show.Show Puppet.Interpreter.Types.RSearchExpression
instance GHC.Classes.Eq Puppet.Interpreter.Types.Strictness
instance GHC.Show.Show Puppet.Interpreter.Types.Strictness
instance GHC.Show.Show Puppet.Interpreter.Types.PValue
instance GHC.Classes.Eq Puppet.Interpreter.Types.PValue
instance GHC.Show.Show Puppet.Interpreter.Types.PrettyError
instance GHC.Base.Monoid Puppet.Interpreter.Types.PrettyError
instance Data.String.IsString Puppet.Interpreter.Types.PrettyError
instance GHC.Exception.Exception Puppet.Interpreter.Types.PrettyError
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.PrettyError
instance Data.String.IsString Puppet.Interpreter.Types.PValue
instance Data.Aeson.Lens.AsNumber Puppet.Interpreter.Types.PValue
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Interpreter.Types.Strictness
instance Data.Hashable.Class.Hashable Puppet.Interpreter.Types.TopLevelType
instance Control.Monad.Error.Class.MonadError Puppet.Interpreter.Types.PrettyError Puppet.Interpreter.Types.InterpreterMonad
instance Control.Monad.Writer.Class.MonadWriter Puppet.Interpreter.Types.InterpreterWriter Puppet.Interpreter.Types.InterpreterMonad
instance Data.Hashable.Class.Hashable Puppet.Interpreter.Types.RIdentifier
instance GHC.Show.Show Puppet.Interpreter.Types.ResourceModifier


-- | The module should not depend on the Interpreter module. It is an
--   internal module and should not be used if expecting a stable API.
module Puppet.Interpreter.Utils
initialState :: Facts -> Container Text -> InterpreterState
getModulename :: RIdentifier -> Text
extractPrism :: Doc -> Prism' a b -> a -> InterpreterMonad b
popScope :: InterpreterMonad ()
pushScope :: CurContainerDesc -> InterpreterMonad ()
getScopeName :: InterpreterMonad Text
scopeName :: CurContainerDesc -> Text
moduleName :: CurContainerDesc -> Text
getScope :: InterpreterMonad CurContainerDesc
getCurContainer :: InterpreterMonad CurContainer
rcurcontainer :: Resource -> CurContainerDesc
getPuppetPaths :: InterpreterMonad PuppetDirPaths
getNodeName :: InterpreterMonad NodeName
isIgnoredModule :: Text -> InterpreterMonad Bool

-- | Throws an error if we are in strict mode A warning in permissive mode
checkStrict :: Doc -> Doc -> InterpreterMonad ()
isExternalModule :: InterpreterMonad Bool
warn :: MonadWriter InterpreterWriter m => Doc -> m ()
debug :: MonadWriter InterpreterWriter m => Doc -> m ()
logWriter :: MonadWriter InterpreterWriter m => Priority -> Doc -> m ()
isEmpty :: (Eq x, Monoid x) => x -> Bool
safeDecodeUtf8 :: ByteString -> InterpreterMonad Text
dropInitialColons :: Text -> Text
normalizeRIdentifier :: Text -> Text -> RIdentifier


-- | A dummy implementation of <a>PuppetDBAPI</a>, that will return empty
--   responses.
module PuppetDB.Dummy
dummyPuppetDB :: Monad m => PuppetDBAPI m

module PuppetDB.Remote

-- | Given an URL (ie. <tt><a>http://localhost:8080</a></tt>), will return
--   an incomplete <a>PuppetDBAPI</a>.
pdbConnect :: Manager -> BaseUrl -> IO (Either PrettyError (PuppetDBAPI IO))


-- | A stub implementation of PuppetDB, backed by a YAML file.
module PuppetDB.TestDB

-- | Initializes the test DB using a file to back its content
loadTestDB :: FilePath -> IO (Either PrettyError (PuppetDBAPI IO))

-- | Starts a new PuppetDB, without any backing file.
initTestDB :: IO (PuppetDBAPI IO)
instance PuppetDB.TestDB.HasBackingFile PuppetDB.TestDB.DBContent (GHC.Base.Maybe GHC.IO.FilePath)
instance PuppetDB.TestDB.HasFacts PuppetDB.TestDB.DBContent (Puppet.Interpreter.Types.Container Puppet.Interpreter.Types.Facts)
instance PuppetDB.TestDB.HasResources PuppetDB.TestDB.DBContent (Puppet.Interpreter.Types.Container Puppet.Interpreter.Types.WireCatalog)
instance Data.Aeson.Types.FromJSON.FromJSON PuppetDB.TestDB.DBContent
instance Data.Aeson.Types.ToJSON.ToJSON PuppetDB.TestDB.DBContent


-- | Common data types for PuppetDB.
module PuppetDB.Common

-- | The supported PuppetDB implementations.
data PDBType

-- | Your standard PuppetDB, queried through the HTTP interface.
PDBRemote :: PDBType

-- | A stupid stub, this is the default choice.
PDBDummy :: PDBType

-- | A slow but handy PuppetDB implementation that is backed by a YAML
--   file.
PDBTest :: PDBType

-- | Given a <a>PDBType</a>, will try return a sane default implementation.
getDefaultDB :: PDBType -> IO (Either PrettyError (PuppetDBAPI IO))

-- | Turns a <a>FinalCatalog</a> and <a>EdgeMap</a> into a document that
--   can be serialized and fed to <tt>puppet apply</tt>.
generateWireCatalog :: NodeName -> FinalCatalog -> EdgeMap -> WireCatalog
instance GHC.Classes.Eq PuppetDB.Common.PDBType
instance GHC.Read.Read PuppetDB.Common.PDBType

module Puppet.Interpreter.PrettyPrinter
containerComma :: Pretty a => Container a -> Doc
instance Text.PrettyPrint.ANSI.Leijen.Pretty Data.Text.Internal.Text
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.PValue
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.TopLevelType
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.RIdentifier
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.Resource
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.CurContainerDesc
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.ResDefaults
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.ResourceModifier
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.RSearchExpression
instance Text.PrettyPrint.ANSI.Leijen.Pretty (Puppet.Interpreter.Types.InterpreterInstr a)
instance Text.PrettyPrint.ANSI.Leijen.Pretty Puppet.Interpreter.Types.LinkInformation

module Puppet.Interpreter.Resolve.Sprintf
data Flag
Minus :: Flag
Plus :: Flag
Space :: Flag
Zero :: Flag
Hash :: Flag
data FLen
Lhh :: FLen
Lh :: FLen
Ll :: FLen
Lll :: FLen
LL :: FLen
Lz :: FLen
Lj :: FLen
Lt :: FLen
data FType
TPct :: FType
Td :: FType
Tu :: FType
Tf :: FType
TF :: FType
Te :: FType
TE :: FType
Tg :: FType
TG :: FType
Tx :: FType
TX :: FType
To :: FType
Ts :: FType
Tc :: FType
Tp :: FType
Ta :: FType
TA :: FType
data PrintfFormat
PrintfFormat :: [Flag] -> Maybe Int -> Maybe Int -> Maybe FLen -> FType -> PrintfFormat
[_pfFlags] :: PrintfFormat -> [Flag]
[_pfWidth] :: PrintfFormat -> Maybe Int
[_pfPrec] :: PrintfFormat -> Maybe Int
[_pfLen] :: PrintfFormat -> Maybe FLen
[_pfType] :: PrintfFormat -> FType
data FormatStringPart
Raw :: Text -> FormatStringPart
Format :: PrintfFormat -> FormatStringPart
parseFormat :: Text -> [FormatStringPart]
flag :: Parser Flag
lenModifier :: Parser FLen
ftype :: Parser FType
format :: Parser PrintfFormat
sprintf :: Text -> [PValue] -> InterpreterMonad PValue
instance GHC.Classes.Eq Puppet.Interpreter.Resolve.Sprintf.FormatStringPart
instance GHC.Show.Show Puppet.Interpreter.Resolve.Sprintf.FormatStringPart
instance GHC.Classes.Eq Puppet.Interpreter.Resolve.Sprintf.PrintfFormat
instance GHC.Show.Show Puppet.Interpreter.Resolve.Sprintf.PrintfFormat
instance GHC.Classes.Eq Puppet.Interpreter.Resolve.Sprintf.FType
instance GHC.Show.Show Puppet.Interpreter.Resolve.Sprintf.FType
instance GHC.Classes.Eq Puppet.Interpreter.Resolve.Sprintf.FLen
instance GHC.Show.Show Puppet.Interpreter.Resolve.Sprintf.FLen
instance GHC.Classes.Eq Puppet.Interpreter.Resolve.Sprintf.Flag
instance GHC.Show.Show Puppet.Interpreter.Resolve.Sprintf.Flag


-- | This module is all about converting and resolving foreign data into
--   the fully exploitable corresponding data type. The main use case is
--   the conversion of <a>Expression</a> to <a>PValue</a>.
module Puppet.Interpreter.Resolve

-- | A pure function for resolving variables.
getVariable :: Container ScopeInformation -> Text -> Text -> Either Doc PValue

-- | Turns a <a>PValue</a> into a <a>Bool</a>, as explained in the
--   reference documentation.
pValue2Bool :: PValue -> Bool

-- | Resolves a variable, or throws an error if it can't.
resolveVariable :: Text -> InterpreterMonad PValue

-- | The main resolution function : turns an <a>Expression</a> into a
--   <a>PValue</a>, if possible.
resolveExpression :: Expression -> InterpreterMonad PValue

-- | Resolves an <a>UnresolvedValue</a> (terminal for the <a>Expression</a>
--   data type) into a <a>PValue</a>
resolveValue :: UnresolvedValue -> InterpreterMonad PValue

-- | Turns strings, numbers and booleans into <a>Text</a>, or throws an
--   error.
resolvePValueString :: PValue -> InterpreterMonad Text

-- | Turns everything it can into a number, or throws an error
resolvePValueNumber :: PValue -> InterpreterMonad Scientific

-- | <pre>
--   resolveExpressionString = resolveExpression &gt;=&gt; resolvePValueString
--   </pre>
resolveExpressionString :: Expression -> InterpreterMonad Text

-- | Just like <a>resolveExpressionString</a>, but accepts arrays.
resolveExpressionStrings :: Expression -> InterpreterMonad [Text]
resolveFunction' :: Text -> [PValue] -> InterpreterMonad PValue

-- | A hiera helper function, that will throw all Hiera errors and log
--   messages to the main monad.
runHiera :: Text -> HieraQueryType -> InterpreterMonad (Maybe PValue)

-- | A simple helper that checks if a given type is native or a define.
isNativeType :: Text -> InterpreterMonad Bool

-- | Turns an unresolved <a>SearchExpression</a> from the parser into a
--   fully resolved <a>RSearchExpression</a>.
resolveSearchExpression :: SearchExpression -> InterpreterMonad RSearchExpression

-- | Checks whether a given <a>Resource</a> matches a
--   <a>RSearchExpression</a>. Note that the expression doesn't check for
--   type, so you must filter the resources by type beforehand, if needs
--   be.
checkSearchExpression :: RSearchExpression -> Resource -> Bool

-- | Turns a resource type and <a>RSearchExpression</a> into something that
--   can be used in a PuppetDB query.
searchExpressionToPuppetDB :: Text -> RSearchExpression -> Query ResourceField

-- | Generates variable associations for evaluation of blocks. Each item
--   corresponds to an iteration in the calling block.
hfGenerateAssociations :: HOLambdaCall -> InterpreterMonad [[(Text, PValue)]]

-- | Sets the proper variables, and returns the scope variables the way
--   they were before being modified. This is a hack that ensures that
--   variables are local to the new scope.
--   
--   It doesn't work at all like other Puppet parts, but consistency isn't
--   really expected here ...
hfSetvars :: [(Text, PValue)] -> InterpreterMonad (Container (Pair (Pair PValue PPosition) CurContainerDesc))

-- | Restores what needs restoring. This will erase all allocations.
hfRestorevars :: Container (Pair (Pair PValue PPosition) CurContainerDesc) -> InterpreterMonad ()

-- | Tries to convert a pair of <a>PValue</a>s into <a>Number</a>s, as
--   defined in attoparsec. If the two values can be converted, it will
--   convert them so that they are of the same type
toNumbers :: PValue -> PValue -> Maybe NumberPair

-- | Converts class resource names to lowercase (fix for the jenkins
--   plugin).
fixResourceName :: Text -> Text -> Text

-- | Checks that a value matches a puppet datatype
datatypeMatch :: DataType -> PValue -> Bool

module Puppet.Stdlib

-- | Contains the implementation of the StdLib functions.
stdlibFunctions :: Container ([PValue] -> InterpreterMonad PValue)


-- | These are the function and data types that are used to define the
--   Puppet native types.
module Puppet.NativeTypes.Helpers
ipaddr :: Text -> NativeTypeValidate
nativetypemethods :: [(Text, [Text -> NativeTypeValidate])] -> NativeTypeValidate -> NativeTypeMethods
paramname :: Text -> Doc
rarray :: Text -> NativeTypeValidate

-- | This checks that a given parameter is a string. If it is a
--   <tt>ResolvedInt</tt> or <tt>ResolvedBool</tt> it will convert them to
--   strings.
string :: Text -> NativeTypeValidate
strings :: Text -> NativeTypeValidate

-- | Validates a string or an array of strings
string_s :: Text -> NativeTypeValidate
noTrailingSlash :: Text -> NativeTypeValidate
fullyQualified :: Text -> NativeTypeValidate
fullyQualifieds :: Text -> NativeTypeValidate

-- | Makes sure that the parameter, if defined, has a value among this
--   list.
values :: [Text] -> Text -> NativeTypeValidate

-- | This fills the default values of unset parameters.
defaultvalue :: Text -> Text -> NativeTypeValidate
concattype :: NativeTypeName -> (NativeTypeName, NativeTypeMethods)

-- | Copies the "name" value into the parameter if this is not set. It
--   implies the <a>string</a> validator.
nameval :: Text -> NativeTypeValidate

-- | Validate resources given a list of valid parameters:
--   
--   <ul>
--   <li>checks that no unknown parameters have been set (except
--   metaparameters)</li>
--   </ul>
defaultValidate :: HashSet Text -> NativeTypeValidate
type NativeTypeName = Text

-- | Helper that takes a list of stuff and will generate a validator.
parameterFunctions :: [(Text, [Text -> NativeTypeValidate])] -> NativeTypeValidate

-- | Checks that a given parameter, if set, is a <tt>ResolvedInt</tt>. If
--   it is a <a>PString</a> it will attempt to parse it.
integer :: Text -> NativeTypeValidate
integers :: Text -> NativeTypeValidate

-- | Checks that a given parameter is set.
mandatory :: Text -> NativeTypeValidate

-- | Checks that a given parameter is set unless the resources "ensure" is
--   set to absent
mandatoryIfNotAbsent :: Text -> NativeTypeValidate
inrange :: Integer -> Integer -> Text -> NativeTypeValidate
faketype :: NativeTypeName -> (NativeTypeName, NativeTypeMethods)
defaulttype :: NativeTypeName -> (NativeTypeName, NativeTypeMethods)

-- | Helper function that runs a validor on a PArray
runarray :: Text -> (Text -> PValue -> NativeTypeValidate) -> NativeTypeValidate

-- | Useful helper for buiding error messages
perror :: Doc -> Either PrettyError Resource
validateSourceOrContent :: NativeTypeValidate


-- | This module holds the <i>native</i> Puppet resource types.
module Puppet.NativeTypes

-- | The map of native types. They are described in
--   <a>Puppet.NativeTypes.Helpers</a>.
baseNativeTypes :: Container NativeTypeMethods

-- | Contrary to the previous iteration, this will let non native types
--   pass.
validateNativeType :: Resource -> InterpreterMonad Resource


-- | Contains an Haskell implementation (or mock implementation) of some
--   ruby functions found in puppetlabs modules
module Puppet.Puppetlabs

-- | Build the map of available ext functions If the ruby file is not found
--   on the local filesystem the record is ignored. This is to avoid
--   potential namespace conflict
extFunctions :: FilePath -> IO (Container ([PValue] -> InterpreterMonad PValue))

module Puppet.Preferences

-- | generate default preferences
dfPreferences :: FilePath -> IO (Preferences IO)
class HasPreferences c_ae55l m_ae50Z | c_ae55l -> m_ae50Z where prefExtFuncs = (.) preferences prefExtFuncs prefExternalmodules = (.) preferences prefExternalmodules prefExtraTests = (.) preferences prefExtraTests prefFactsDefault = (.) preferences prefFactsDefault prefFactsOverride = (.) preferences prefFactsOverride prefHieraPath = (.) preferences prefHieraPath prefIgnoredmodules = (.) preferences prefIgnoredmodules prefKnowngroups = (.) preferences prefKnowngroups prefKnownusers = (.) preferences prefKnownusers prefLogLevel = (.) preferences prefLogLevel prefNatTypes = (.) preferences prefNatTypes prefPDB = (.) preferences prefPDB prefPuppetPaths = (.) preferences prefPuppetPaths prefPuppetSettings = (.) preferences prefPuppetSettings prefStrictness = (.) preferences prefStrictness
preferences :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (Preferences m_ae50Z)
prefExtFuncs :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (Container ([PValue] -> InterpreterMonad PValue))
prefExternalmodules :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (HashSet Text)
prefExtraTests :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l Bool
prefFactsDefault :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (Container PValue)
prefFactsOverride :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (Container PValue)
prefHieraPath :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (Maybe FilePath)
prefIgnoredmodules :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (HashSet Text)
prefKnowngroups :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l [Text]
prefKnownusers :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l [Text]
prefLogLevel :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l Priority
prefNatTypes :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (Container NativeTypeMethods)
prefPDB :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (PuppetDBAPI m_ae50Z)
prefPuppetPaths :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l PuppetDirPaths
prefPuppetSettings :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l (Container Text)
prefStrictness :: HasPreferences c_ae55l m_ae50Z => Lens' c_ae55l Strictness
data Preferences m
Preferences :: PuppetDirPaths -> PuppetDBAPI m -> Container NativeTypeMethods -> Container ([PValue] -> InterpreterMonad PValue) -> Maybe FilePath -> HashSet Text -> Strictness -> Bool -> [Text] -> [Text] -> HashSet Text -> Container Text -> Container PValue -> Container PValue -> Priority -> Preferences m
data PuppetDirPaths
class HasPuppetDirPaths c_aWbH where baseDir = (.) puppetDirPaths baseDir manifestPath = (.) puppetDirPaths manifestPath modulesPath = (.) puppetDirPaths modulesPath templatesPath = (.) puppetDirPaths templatesPath testPath = (.) puppetDirPaths testPath
puppetDirPaths :: HasPuppetDirPaths c_aWbH => Lens' c_aWbH PuppetDirPaths
baseDir :: HasPuppetDirPaths c_aWbH => Lens' c_aWbH FilePath
manifestPath :: HasPuppetDirPaths c_aWbH => Lens' c_aWbH FilePath
modulesPath :: HasPuppetDirPaths c_aWbH => Lens' c_aWbH FilePath
templatesPath :: HasPuppetDirPaths c_aWbH => Lens' c_aWbH FilePath
testPath :: HasPuppetDirPaths c_aWbH => Lens' c_aWbH FilePath
instance Puppet.Preferences.HasPreferences (Puppet.Preferences.Preferences m0) m0
instance Data.Aeson.Types.FromJSON.FromJSON Puppet.Preferences.Defaults
instance GHC.Show.Show Puppet.Preferences.Defaults


-- | This is an internal module.
module Puppet.Interpreter.IO
defaultImpureMethods :: MonadIO m => IoMethods m

-- | The operational interpreter function
interpretMonad :: Monad m => InterpreterReader m -> InterpreterState -> InterpreterMonad a -> m (Either PrettyError a, InterpreterState, InterpreterWriter)


-- | This module runs a Hiera server that caches Hiera data. There is a
--   huge caveat : only the data files are watched for changes, not the
--   main configuration file.
--   
--   A minor bug is that interpolation will not work for inputs containing
--   the % character when it isn't used for interpolation.
module Hiera.Server

-- | The only method you'll ever need. It runs a Hiera server and gives you
--   a querying function. The <tt>Nil</tt> output is explicitely given as a
--   Maybe type.
startHiera :: FilePath -> IO (Either String (HieraQueryFunc IO))

-- | A dummy hiera function that will be used when hiera is not detected
dummyHiera :: Monad m => HieraQueryFunc m
hieraLoggerName :: String

-- | The type of the Hiera API function
type HieraQueryFunc m = Container Text  All the variables that Hiera can interpolate, the top level ones being prefixed with :: -> Text  The query -> HieraQueryType -> m (Either PrettyError (Maybe PValue))
instance Hiera.Server.HasHieraConfigFile Hiera.Server.HieraConfigFile
instance Data.Aeson.Types.FromJSON.FromJSON Hiera.Server.InterpolableHieraString
instance Data.Aeson.Types.FromJSON.FromJSON Hiera.Server.HieraConfigFile
instance GHC.Show.Show Hiera.Server.HieraConfigFile
instance GHC.Show.Show Hiera.Server.InterpolableHieraString
instance GHC.Show.Show Hiera.Server.HieraStringPart
instance GHC.Show.Show Hiera.Server.Backend
instance Text.PrettyPrint.ANSI.Leijen.Pretty Hiera.Server.HieraStringPart

module Facter
storageunits :: [(String, Int)]
getPrefix :: Int -> String
getOrder :: String -> Int
normalizeUnit :: (Double, Int) -> Double -> (Double, Int)
storagedesc :: (String, String) -> String
factRAM :: IO [(String, String)]
factNET :: IO [(String, String)]
factOS :: IO [(String, String)]
factOSDebian :: IO [(String, String)]
factOSLSB :: IO [(String, String)]
factMountPoints :: IO [(String, String)]
fversion :: IO [(String, String)]
factUser :: IO [(String, String)]
factUName :: IO [(String, String)]
fenv :: IO [(String, String)]
factProcessor :: IO [(String, String)]
puppetDBFacts :: NodeName -> PuppetDBAPI IO -> IO (Container PValue)


-- | Base types for the internal ruby parser (<a>Erb.Parser</a>).
module Erb.Ruby
data Value
Literal :: !Text -> Value
Interpolable :: ![Expression] -> Value
Symbol :: !Text -> Value
Array :: ![Expression] -> Value
data Expression
LookupOperation :: !Expression -> !Expression -> Expression
PlusOperation :: !Expression -> !Expression -> Expression
MinusOperation :: !Expression -> !Expression -> Expression
DivOperation :: !Expression -> !Expression -> Expression
MultiplyOperation :: !Expression -> !Expression -> Expression
ShiftLeftOperation :: !Expression -> !Expression -> Expression
ShiftRightOperation :: !Expression -> !Expression -> Expression
AndOperation :: !Expression -> !Expression -> Expression
OrOperation :: !Expression -> !Expression -> Expression
EqualOperation :: !Expression -> !Expression -> Expression
DifferentOperation :: !Expression -> !Expression -> Expression
AboveOperation :: !Expression -> !Expression -> Expression
AboveEqualOperation :: !Expression -> !Expression -> Expression
UnderEqualOperation :: !Expression -> !Expression -> Expression
UnderOperation :: !Expression -> !Expression -> Expression
RegexpOperation :: !Expression -> !Expression -> Expression
NotRegexpOperation :: !Expression -> !Expression -> Expression
NotOperation :: !Expression -> Expression
NegOperation :: !Expression -> Expression
ConditionalValue :: !Expression -> !Expression -> Expression
Object :: !Expression -> Expression
MethodCall :: !Expression -> !Expression -> Expression
BlockOperation :: !Text -> Expression
Value :: !Value -> Expression
BTrue :: Expression
BFalse :: Expression
Error :: !String -> Expression
data RubyStatement
Puts :: !Expression -> RubyStatement
DropPrevSpace :: !RubyStatement -> RubyStatement
DropPrevSpace' :: RubyStatement
DropNextSpace :: !RubyStatement -> RubyStatement
instance GHC.Classes.Eq Erb.Ruby.RubyStatement
instance GHC.Show.Show Erb.Ruby.RubyStatement
instance GHC.Classes.Eq Erb.Ruby.Value
instance GHC.Classes.Ord Erb.Ruby.Value
instance GHC.Show.Show Erb.Ruby.Value
instance GHC.Classes.Eq Erb.Ruby.Expression
instance GHC.Classes.Ord Erb.Ruby.Expression
instance GHC.Show.Show Erb.Ruby.Expression
instance Text.PrettyPrint.ANSI.Leijen.Pretty Erb.Ruby.Expression

module Erb.Parser
def :: GenLanguageDef String u Identity
lexer :: GenTokenParser String u Identity
parens :: Parser a -> Parser a
braces :: Parser a -> Parser a
operator :: Parser String
symbol :: String -> Parser String
reservedOp :: String -> Parser ()
whiteSpace :: Parser ()
naturalOrFloat :: Parser (Either Integer Double)
identifier :: Parser String
rubyexpression :: Parser Expression
table :: [[Operator String () Identity Expression]]
term :: Parser Expression
scopeLookup :: Parser Expression
stringLiteral :: Parser Expression
doubleQuoted :: Parser Value
singleQuoted :: Parser Value
objectterm :: Parser Expression
variablereference :: Parser Expression
rubystatement :: Parser RubyStatement
textblockW :: Maybe Char -> Parser [RubyStatement]
textblock :: Parser [RubyStatement]
rubyblock :: Parser [RubyStatement]
erbparser :: Parser [RubyStatement]
parseErbFile :: FilePath -> IO (Either ParseError [RubyStatement])
parseErbString :: String -> Either ParseError [RubyStatement]


-- | Evaluates a ruby template from what's generated by <a>Erb.Parser</a>.
module Erb.Evaluate
rubyEvaluate :: Container ScopeInformation -> Text -> [RubyStatement] -> Either Doc Text

-- | A pure function for resolving variables.
getVariable :: Container ScopeInformation -> Text -> Text -> Either Doc PValue
extractFromState :: InterpreterState -> Maybe (Text, Container ScopeInformation)


-- | This is a set of pure helpers for evaluation the
--   <a>InterpreterMonad</a> function that can be found in
--   <a>Puppet.Interpreter</a> and <a>Puppet.Interpreter.Resolve</a>. They
--   are used to power some prisms from <a>Puppet.Lens</a>.
--   
--   <pre>
--   &gt; dummyEval (resolveExpression (Addition "1" "2"))
--   Right (PString "3")
--   </pre>
module Puppet.Interpreter.Pure

-- | Worst name ever, this is a set of pure stub for the
--   <tt>ImpureMethods</tt> type.
impurePure :: IoMethods Identity

-- | A pure <a>InterpreterReader</a>, that can only evaluate a subset of
--   the templates, and that can include only the supplied top level
--   statements.
pureReader :: HashMap (TopLevelType, Text) Statement -> InterpreterReader Identity

-- | Evaluates an interpreter expression in a pure context.
pureEval :: Facts -> HashMap (TopLevelType, Text) Statement -> InterpreterMonad a -> (Either PrettyError a, InterpreterState, InterpreterWriter)

-- | A bunch of facts that can be used for pure evaluation.
dummyFacts :: Facts

-- | A default evaluation function for arbitrary interpreter actions.
dummyEval :: InterpreterMonad a -> Either PrettyError a

module Puppet.Lens

-- | Incomplete
_PResolveExpression :: Prism' Expression PValue
_PResolveValue :: Prism' UnresolvedValue PValue
_PHash :: Prism' PValue (Container PValue)
_PBoolean :: Prism' PValue Bool
_PString :: Prism' PValue Text
_PNumber :: Prism' PValue Scientific
_PResourceReference :: Prism' PValue (Text, Text)
_PUndef :: Prism' PValue ()
_PArray :: Prism' PValue (Vector PValue)

-- | Extracts the statements from <a>ClassDeclaration</a>,
--   <a>DefineDeclaration</a>, <tt>Node</tt> and the spurious statements of
--   <a>TopContainer</a>.
_Statements :: Lens' Statement [Statement]
_ResDecl :: Prism' Statement ResDecl
_ResDefaultDecl :: Prism' Statement ResDefaultDecl
_ResOverrDecl :: Prism' Statement ResOverrideDecl
_ResCollDecl :: Prism' Statement ResCollDecl
_ConditionalDecl :: Prism' Statement ConditionalDecl
_ClassDecl :: Prism' Statement ClassDecl
_DefineDecl :: Prism' Statement DefineDecl
_NodeDecl :: Prism' Statement NodeDecl
_VarAssignDecl :: Prism' Statement VarAssignDecl
_MainFuncDecl :: Prism' Statement MainFuncDecl
_HigherOrderLambdaDecl :: Prism' Statement HigherOrderLambdaDecl
_DepDecl :: Prism' Statement DepDecl
_Equal :: Prism' Expression (Expression, Expression)
_Different :: Prism' Expression (Expression, Expression)
_Not :: Prism' Expression Expression
_And :: Prism' Expression (Expression, Expression)
_Or :: Prism' Expression (Expression, Expression)
_LessThan :: Prism' Expression (Expression, Expression)
_MoreThan :: Prism' Expression (Expression, Expression)
_LessEqualThan :: Prism' Expression (Expression, Expression)
_MoreEqualThan :: Prism' Expression (Expression, Expression)
_RegexMatch :: Prism' Expression (Expression, Expression)
_NotRegexMatch :: Prism' Expression (Expression, Expression)
_Contains :: Prism' Expression (Expression, Expression)
_Addition :: Prism' Expression (Expression, Expression)
_Substraction :: Prism' Expression (Expression, Expression)
_Division :: Prism' Expression (Expression, Expression)
_Multiplication :: Prism' Expression (Expression, Expression)
_Modulo :: Prism' Expression (Expression, Expression)
_RightShift :: Prism' Expression (Expression, Expression)
_LeftShift :: Prism' Expression (Expression, Expression)
_Lookup :: Prism' Expression (Expression, Expression)
_Negate :: Prism' Expression Expression
_ConditionalValue :: Prism' Expression (Expression, Vector (Pair SelectorCase Expression))
_FunctionApplication :: Prism' Expression (Expression, Expression)
_Terminal :: Prism' Expression UnresolvedValue
_PrettyError :: Prism' SomeException PrettyError

module Puppet.Interpreter

-- | Call the operational <a>interpretMonad</a> function to compute the
--   catalog. Returns either an error, or a tuple containing all the
--   resources, dependency map, exported resources, and defined resources
--   alongside with all messages that have been generated by the
--   compilation process.
--   
--   The later <a>definedResources</a> (eg. all class declarations) are
--   pulled out of the <a>InterpreterState</a> and might not be up to date.
--   There are only useful for coverage testing (checking dependencies for
--   instance).
interpretCatalog :: Monad m => InterpreterReader m -> NodeName -> Facts -> Container Text -> m (Pair (Either PrettyError (FinalCatalog, EdgeMap, FinalCatalog, [Resource])) [Pair Priority Doc])
evaluateStatement :: Statement -> InterpreterMonad [Resource]

-- | Main internal entry point, this function completes the interpretation
--   TODO: add some doc here
computeCatalog :: NodeName -> InterpreterMonad (FinalCatalog, EdgeMap, FinalCatalog, [Resource])


-- | The module works in IO and throws a <a>PrettyError</a> exception at
--   each failure. These exceptions can be caught (see the exceptions
--   package).
module Puppet.OptionalTests

-- | Entry point for all optional tests
testCatalog :: Preferences IO -> FinalCatalog -> IO ()

module Puppet.Daemon

-- | API for the Daemon. The main method is <a>getCatalog</a>: given a node
--   and a list of facts, it returns the result of the compilation. This
--   will be either an error, or a tuple containing: - all the resources in
--   this catalog - the dependency map - the exported resources - a list of
--   known resources, that might not be up to date, but are here for code
--   coverage tests.
--   
--   Notes :
--   
--   <ul>
--   <li>It might be buggy when top level statements that are not
--   class/define/nodes are altered, or when files loaded with require are
--   changed.</li>
--   <li>The catalog is not computed exactly the same way Puppet does. Some
--   good practices are enforced, particularly in strict mode. For
--   instance, unknown variables are always an error. Querying a dictionary
--   with a non existent key returns undef in puppet, whereas it would
--   throw an error in strict mode.</li>
--   </ul>
data Daemon
Daemon :: (NodeName -> Facts -> IO (Either PrettyError (FinalCatalog, EdgeMap, FinalCatalog, [Resource]))) -> MStats -> MStats -> MStats -> Daemon
[getCatalog] :: Daemon -> NodeName -> Facts -> IO (Either PrettyError (FinalCatalog, EdgeMap, FinalCatalog, [Resource]))
[parserStats] :: Daemon -> MStats
[catalogStats] :: Daemon -> MStats
[templateStats] :: Daemon -> MStats

-- | Entry point to get a Daemon It will initialize the parsing and
--   interpretation infrastructure from the <a>Preferences</a>.
--   
--   Internally it initializes a thread for the LUA interpreter, and a
--   thread for the Ruby one. It should cache the AST of every .pp file,
--   and could use a bit of memory. As a comparison, it fits in 60 MB with
--   the author's manifests, but really breathes when given 300 MB of heap
--   space. In this configuration, even if it spawns a ruby process for
--   every template evaluation, it is way faster than the puppet stack.
--   
--   It can optionally talk with PuppetDB, by setting an URL via the
--   <a>prefPDB</a>. The recommended way to set it to
--   <a>http://localhost:8080</a> and set a SSH tunnel :
--   
--   <pre>
--   ssh -L 8080:localhost:8080 puppet.host
--   </pre>
initDaemon :: Preferences IO -> IO Daemon

-- | In case of a Left value, print the error and exit immediately
checkError :: Show e => Doc -> Either e a -> IO a
