-- 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.1.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 () -- | 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 -- StatsPoints. 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 SourcePos. 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 PPosition 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 Expressions 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 higher order functions. FunctionApplication :: !Expression -> !Expression -> Expression -- | Terminal object contains no expression Terminal :: !UnresolvedValue -> Expression data SelectorCase SelectorValue :: !UnresolvedValue -> SelectorCase SelectorDefault :: SelectorCase -- | An unresolved value, typically the parser's output. data UnresolvedValue -- | Special tokens generated when parsing the true or -- false 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 undef -- 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 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_aIaS where hoLambdaExpr = (.) hOLambdaCall hoLambdaExpr hoLambdaFunc = (.) hOLambdaCall hoLambdaFunc hoLambdaLastExpr = (.) hOLambdaCall hoLambdaLastExpr hoLambdaParams = (.) hOLambdaCall hoLambdaParams hoLambdaStatements = (.) hOLambdaCall hoLambdaStatements hOLambdaCall :: HasHOLambdaCall c_aIaS => Lens' c_aIaS HOLambdaCall hoLambdaExpr :: HasHOLambdaCall c_aIaS => Lens' c_aIaS (Maybe Expression) hoLambdaFunc :: HasHOLambdaCall c_aIaS => Lens' c_aIaS LambdaFunc hoLambdaLastExpr :: HasHOLambdaCall c_aIaS => Lens' c_aIaS (Maybe Expression) hoLambdaParams :: HasHOLambdaCall c_aIaS => Lens' c_aIaS LambdaParameters hoLambdaStatements :: HasHOLambdaCall c_aIaS => Lens' c_aIaS (Vector Statement) -- | Lambda block parameters: Currently only two types of block parameters -- are supported: single values and pairs. data LambdaParameters -- |
-- |k| --BPSingle :: !Text -> LambdaParameters -- |
-- |k,v| --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 -- | Search expression inside collector `searchexpr |` data SearchExpression EqualitySearch :: !Text -> !Expression -> SearchExpression NonEqualitySearch :: !Text -> !Expression -> SearchExpression AndSearch :: !SearchExpression -> !SearchExpression -> SearchExpression OrSearch :: !SearchExpression -> !SearchExpression -> SearchExpression AlwaysTrue :: SearchExpression data ArrowOp -- | +> AppendArrow :: ArrowOp -- | `=>` AssignArrow :: ArrowOp data AttributeDecl AttributeDecl :: !Text -> !ArrowOp -> !Expression -> AttributeDecl -- | All types of conditional statements (case, if, 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 Text (Maybe Expression))) -> !(Maybe Text) -> !(Vector Statement) -> !PPosition -> ClassDecl -- | Resource default: e.g `File { mode => 755 }` -- https://docs.puppetlabs.com/puppet/latest/reference/lang_defaults.html#language:-resource-default-statements 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 => 755}` data ResDecl ResDecl :: !Text -> !Expression -> !(Vector AttributeDecl) -> !Virtuality -> !PPosition -> ResDecl -- | Resource override: e.g `File[title] { mode => 755}` -- https://docs.puppetlabs.com/puppet/latest/reference/lang_resources_advanced.html#amending-attributes-with-a-resource-reference data ResOverrideDecl ResOverrideDecl :: !Text -> !Expression -> !(Vector AttributeDecl) -> !PPosition -> ResOverrideDecl data DefineDecl DefineDecl :: !Text -> !(Vector (Pair Text (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 = world data VarAssignDecl VarAssignDecl :: !Text -> !Expression -> !PPosition -> VarAssignDecl data MainFuncDecl MainFuncDecl :: !Text -> !(Vector Expression) -> !PPosition -> MainFuncDecl -- | Higher order function call. data HigherOrderLambdaDecl HigherOrderLambdaDecl :: !HOLambdaCall -> !PPosition -> HigherOrderLambdaDecl -- | Resource Collector including exported collector (` `) e.g `User -- title == 'jenkins' | { groups +> "docker"}` -- https://docs.puppetlabs.com/puppet/latest/reference/lang_collectors.html#language:-resource-collectors data ResCollDecl ResCollDecl :: !CollectorType -> !Text -> !SearchExpression -> !(Vector AttributeDecl) -> !PPosition -> ResCollDecl instance Puppet.Parser.Types.HasHOLambdaCall Puppet.Parser.Types.HOLambdaCall instance GHC.Generics.Constructor Puppet.Parser.Types.C1_3LinkType instance GHC.Generics.Constructor Puppet.Parser.Types.C1_2LinkType instance GHC.Generics.Constructor Puppet.Parser.Types.C1_1LinkType instance GHC.Generics.Constructor Puppet.Parser.Types.C1_0LinkType instance GHC.Generics.Datatype Puppet.Parser.Types.D1LinkType 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.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 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 -- | 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 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 Text (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.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.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 -- | Parse puppet source code from text. module Puppet.Parser -- | Run a puppet parser against some Text input. runPParser :: String -> Text -> Either (ParseError Char Dec) (Vector Statement) -- | Parse a collection of puppet Statement. puppetParser :: Parser (Vector Statement) -- | Parse a puppet Expression. expression :: Parser Expression instance Data.Foldable.Foldable Puppet.Parser.OperatorChain module Puppet.Interpreter.Types class HasResource c_a4qfT 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_a4qfT => Lens' c_a4qfT Resource ralias :: HasResource c_a4qfT => Lens' c_a4qfT (HashSet Text) rattributes :: HasResource c_a4qfT => Lens' c_a4qfT (Container PValue) rid :: HasResource c_a4qfT => Lens' c_a4qfT RIdentifier rnode :: HasResource c_a4qfT => Lens' c_a4qfT NodeName rpos :: HasResource c_a4qfT => Lens' c_a4qfT PPosition rrelations :: HasResource c_a4qfT => Lens' c_a4qfT (HashMap RIdentifier (HashSet LinkType)) rscope :: HasResource c_a4qfT => Lens' c_a4qfT [CurContainerDesc] rtags :: HasResource c_a4qfT => Lens' c_a4qfT (HashSet Text) rvirtuality :: HasResource c_a4qfT => Lens' c_a4qfT Virtuality -- | A fully resolved puppet resource that will be used in the -- FinalCatalog. data Resource Resource :: !RIdentifier -> !(HashSet Text) -> !(Container PValue) -> !(HashMap RIdentifier (HashSet LinkType)) -> ![CurContainerDesc] -> !Virtuality -> !(HashSet Text) -> !PPosition -> !NodeName -> Resource class HasResDefaults c_a4pXt where resDefPos = (.) resDefaults resDefPos resDefSrcScope = (.) resDefaults resDefSrcScope resDefType = (.) resDefaults resDefType resDefValues = (.) resDefaults resDefValues resDefaults :: HasResDefaults c_a4pXt => Lens' c_a4pXt ResDefaults resDefPos :: HasResDefaults c_a4pXt => Lens' c_a4pXt PPosition resDefSrcScope :: HasResDefaults c_a4pXt => Lens' c_a4pXt Text resDefType :: HasResDefaults c_a4pXt => Lens' c_a4pXt Text resDefValues :: HasResDefaults c_a4pXt => Lens' c_a4pXt (Container PValue) -- | From the evaluation of Resource Default Declaration data ResDefaults ResDefaults :: !Text -> !Text -> !(Container PValue) -> !PPosition -> ResDefaults class HasLinkInformation c_a4pTs where linkPos = (.) linkInformation linkPos linkType = (.) linkInformation linkType linkdst = (.) linkInformation linkdst linksrc = (.) linkInformation linksrc linkInformation :: HasLinkInformation c_a4pTs => Lens' c_a4pTs LinkInformation linkPos :: HasLinkInformation c_a4pTs => Lens' c_a4pTs PPosition linkType :: HasLinkInformation c_a4pTs => Lens' c_a4pTs LinkType linkdst :: HasLinkInformation c_a4pTs => Lens' c_a4pTs RIdentifier linksrc :: HasLinkInformation c_a4pTs => Lens' c_a4pTs RIdentifier data LinkInformation LinkInformation :: !RIdentifier -> !RIdentifier -> !LinkType -> !PPosition -> LinkInformation class HasRIdentifier c_a4pO4 where iname = (.) rIdentifier iname itype = (.) rIdentifier itype rIdentifier :: HasRIdentifier c_a4pO4 => Lens' c_a4pO4 RIdentifier iname :: HasRIdentifier c_a4pO4 => Lens' c_a4pO4 Text itype :: HasRIdentifier c_a4pO4 => Lens' c_a4pO4 Text data RIdentifier RIdentifier :: !Text -> !Text -> RIdentifier class HasScopeInformation c_a4q9K where scopeContainer = (.) scopeInformation scopeContainer scopeExtraTags = (.) scopeInformation scopeExtraTags scopeOverrides = (.) scopeInformation scopeOverrides scopeParent = (.) scopeInformation scopeParent scopeResDefaults = (.) scopeInformation scopeResDefaults scopeVariables = (.) scopeInformation scopeVariables scopeInformation :: HasScopeInformation c_a4q9K => Lens' c_a4q9K ScopeInformation scopeContainer :: HasScopeInformation c_a4q9K => Lens' c_a4q9K CurContainer scopeExtraTags :: HasScopeInformation c_a4q9K => Lens' c_a4q9K (HashSet Text) scopeOverrides :: HasScopeInformation c_a4q9K => Lens' c_a4q9K (HashMap RIdentifier ResRefOverride) scopeParent :: HasScopeInformation c_a4q9K => Lens' c_a4q9K (Maybe Text) scopeResDefaults :: HasScopeInformation c_a4q9K => Lens' c_a4q9K (Container ResDefaults) scopeVariables :: HasScopeInformation c_a4q9K => Lens' c_a4q9K (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_a4q1w where rmDeclaration = (.) resourceModifier rmDeclaration rmModifierType = (.) resourceModifier rmModifierType rmMutation = (.) resourceModifier rmMutation rmResType = (.) resourceModifier rmResType rmSearch = (.) resourceModifier rmSearch rmType = (.) resourceModifier rmType resourceModifier :: HasResourceModifier c_a4q1w => Lens' c_a4q1w ResourceModifier rmDeclaration :: HasResourceModifier c_a4q1w => Lens' c_a4q1w PPosition rmModifierType :: HasResourceModifier c_a4q1w => Lens' c_a4q1w ModifierType rmMutation :: HasResourceModifier c_a4q1w => Lens' c_a4q1w (Resource -> InterpreterMonad Resource) rmResType :: HasResourceModifier c_a4q1w => Lens' c_a4q1w Text rmSearch :: HasResourceModifier c_a4q1w => Lens' c_a4q1w RSearchExpression rmType :: HasResourceModifier c_a4q1w => Lens' c_a4q1w ResourceCollectorType data ResourceModifier ResourceModifier :: !Text -> !ModifierType -> !ResourceCollectorType -> !RSearchExpression -> !(Resource -> InterpreterMonad Resource) -> !PPosition -> ResourceModifier class HasIoMethods c_a4qL2 m_a4oGC | c_a4qL2 -> m_a4oGC where ioGetCurrentCallStack = (.) ioMethods ioGetCurrentCallStack ioReadFile = (.) ioMethods ioReadFile ioTraceEvent = (.) ioMethods ioTraceEvent ioMethods :: HasIoMethods c_a4qL2 m_a4oGC => Lens' c_a4qL2 (IoMethods m_a4oGC) ioGetCurrentCallStack :: HasIoMethods c_a4qL2 m_a4oGC => Lens' c_a4qL2 (m_a4oGC [String]) ioReadFile :: HasIoMethods c_a4qL2 m_a4oGC => Lens' c_a4qL2 ([Text] -> m_a4oGC (Either String Text)) ioTraceEvent :: HasIoMethods c_a4qL2 m_a4oGC => Lens' c_a4qL2 (String -> m_a4oGC ()) data IoMethods m IoMethods :: m [String] -> ([Text] -> m (Either String Text)) -> (String -> m ()) -> IoMethods m class HasCurContainer c_a4qOF where cctags = (.) curContainer cctags cctype = (.) curContainer cctype curContainer :: HasCurContainer c_a4qOF => Lens' c_a4qOF CurContainer cctags :: HasCurContainer c_a4qOF => Lens' c_a4qOF (HashSet Text) cctype :: HasCurContainer c_a4qOF => Lens' c_a4qOF CurContainerDesc -- | TODO related to Scope: explain ... data CurContainer CurContainer :: !CurContainerDesc -> !(HashSet Text) -> CurContainer class HasNativeTypeMethods c_a4q7t where puppetFields = (.) nativeTypeMethods puppetFields puppetValidate = (.) nativeTypeMethods puppetValidate nativeTypeMethods :: HasNativeTypeMethods c_a4q7t => Lens' c_a4q7t NativeTypeMethods puppetFields :: HasNativeTypeMethods c_a4q7t => Lens' c_a4q7t (HashSet Text) puppetValidate :: HasNativeTypeMethods c_a4q7t => Lens' c_a4q7t 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_a4qQW where nodeInfoCatalogT = (.) nodeInfo nodeInfoCatalogT nodeInfoDeactivated = (.) nodeInfo nodeInfoDeactivated nodeInfoFactsT = (.) nodeInfo nodeInfoFactsT nodeInfoName = (.) nodeInfo nodeInfoName nodeInfoReportT = (.) nodeInfo nodeInfoReportT nodeInfo :: HasNodeInfo c_a4qQW => Lens' c_a4qQW NodeInfo nodeInfoCatalogT :: HasNodeInfo c_a4qQW => Lens' c_a4qQW (Maybe UTCTime) nodeInfoDeactivated :: HasNodeInfo c_a4qQW => Lens' c_a4qQW Bool nodeInfoFactsT :: HasNodeInfo c_a4qQW => Lens' c_a4qQW (Maybe UTCTime) nodeInfoName :: HasNodeInfo c_a4qQW => Lens' c_a4qQW NodeName nodeInfoReportT :: HasNodeInfo c_a4qQW => Lens' c_a4qQW (Maybe UTCTime) data FactInfo FactInfo :: !NodeName -> !Text -> !PValue -> FactInfo class HasFactInfo c_a4r10 where factInfoName = (.) factInfo factInfoName factInfoNodename = (.) factInfo factInfoNodename factInfoVal = (.) factInfo factInfoVal factInfo :: HasFactInfo c_a4r10 => Lens' c_a4r10 FactInfo factInfoName :: HasFactInfo c_a4r10 => Lens' c_a4r10 Text factInfoNodename :: HasFactInfo c_a4r10 => Lens' c_a4r10 NodeName factInfoVal :: HasFactInfo c_a4r10 => Lens' c_a4r10 PValue class HasWireCatalog c_a4qVZ where wireCatalogEdges = (.) wireCatalog wireCatalogEdges wireCatalogNodename = (.) wireCatalog wireCatalogNodename wireCatalogResources = (.) wireCatalog wireCatalogResources wireCatalogTransactionUUID = (.) wireCatalog wireCatalogTransactionUUID wireCatalogVersion = (.) wireCatalog wireCatalogVersion wireCatalog :: HasWireCatalog c_a4qVZ => Lens' c_a4qVZ WireCatalog wireCatalogEdges :: HasWireCatalog c_a4qVZ => Lens' c_a4qVZ (Vector PuppetEdge) wireCatalogNodename :: HasWireCatalog c_a4qVZ => Lens' c_a4qVZ NodeName wireCatalogResources :: HasWireCatalog c_a4qVZ => Lens' c_a4qVZ (Vector Resource) wireCatalogTransactionUUID :: HasWireCatalog c_a4qVZ => Lens' c_a4qVZ Text wireCatalogVersion :: HasWireCatalog c_a4qVZ => Lens' c_a4qVZ 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_a4qxb m_a4oGD | c_a4qxb -> m_a4oGD 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_a4qxb m_a4oGD => Lens' c_a4qxb (InterpreterReader m_a4oGD) readerExternalFunc :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb (Container ([PValue] -> InterpreterMonad PValue)) readerExternalModules :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb (HashSet Text) readerGetStatement :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb (TopLevelType -> Text -> m_a4oGD (Either PrettyError Statement)) readerGetTemplate :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb (Either Text Text -> InterpreterState -> InterpreterReader m_a4oGD -> m_a4oGD (Either PrettyError Text)) readerHieraQuery :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb (HieraQueryFunc m_a4oGD) readerIgnoredModules :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb (HashSet Text) readerIoMethods :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb (IoMethods m_a4oGD) readerIsStrict :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb Bool readerNativeTypes :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb (Container NativeTypeMethods) readerNodename :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb Text readerPdbApi :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb (PuppetDBAPI m_a4oGD) readerPuppetPaths :: HasInterpreterReader c_a4qxb m_a4oGD => Lens' c_a4qxb 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_a4qp4 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_a4qp4 => Lens' c_a4qp4 InterpreterState curPos :: HasInterpreterState c_a4qp4 => Lens' c_a4qp4 PPosition curScope :: HasInterpreterState c_a4qp4 => Lens' c_a4qp4 [CurContainerDesc] definedResources :: HasInterpreterState c_a4qp4 => Lens' c_a4qp4 (HashMap RIdentifier Resource) extraRelations :: HasInterpreterState c_a4qp4 => Lens' c_a4qp4 [LinkInformation] loadedClasses :: HasInterpreterState c_a4qp4 => Lens' c_a4qp4 (Container (Pair ClassIncludeType PPosition)) nestedDeclarations :: HasInterpreterState c_a4qp4 => Lens' c_a4qp4 (HashMap (TopLevelType, Text) Statement) resMod :: HasInterpreterState c_a4qp4 => Lens' c_a4qp4 [ResourceModifier] scopes :: HasInterpreterState c_a4qp4 => Lens' c_a4qp4 (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 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 -- http://docs.puppetlabs.com/puppetdb/1.5/api/wire_format/catalog_format.html. 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 -- https://docs.puppetlabs.com/puppet/latest/reference/lang_classes.html#include-like-vs-resource-like 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 -- http://docs.puppetlabs.com/puppetdb/2.3/api/wire_format/catalog_format_v5.html#data-type-edge 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 -- | -- http://docs.puppetlabs.com/puppetdb/1.5/api/commands.html#replace-catalog-version-3 [replaceCatalog] :: PuppetDBAPI m -> WireCatalog -> ExceptT PrettyError m () -- | -- http://docs.puppetlabs.com/puppetdb/1.5/api/commands.html#replace-facts-version-1 [replaceFacts] :: PuppetDBAPI m -> [(NodeName, Facts)] -> ExceptT PrettyError m () -- | -- http://docs.puppetlabs.com/puppetdb/1.5/api/commands.html#deactivate-node-version-1 [deactivateNode] :: PuppetDBAPI m -> NodeName -> ExceptT PrettyError m () -- | -- http://docs.puppetlabs.com/puppetdb/1.5/api/query/v3/facts.html#get-v3facts [getFacts] :: PuppetDBAPI m -> Query FactField -> ExceptT PrettyError m [FactInfo] -- | -- http://docs.puppetlabs.com/puppetdb/1.5/api/query/v3/resources.html#get-v3resources [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 metaparameters :: HashSet Text showPos :: Position -> Doc instance Puppet.Interpreter.Types.HasFactInfo Puppet.Interpreter.Types.FactInfo 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.HttpApiData.Internal.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.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.Generics.Selector Puppet.Interpreter.Types.S1_0_1RIdentifier instance GHC.Generics.Selector Puppet.Interpreter.Types.S1_0_0RIdentifier instance GHC.Generics.Constructor Puppet.Interpreter.Types.C1_0RIdentifier instance GHC.Generics.Datatype Puppet.Interpreter.Types.D1RIdentifier instance GHC.Generics.Constructor Puppet.Interpreter.Types.C1_4CurContainerDesc instance GHC.Generics.Constructor Puppet.Interpreter.Types.C1_3CurContainerDesc instance GHC.Generics.Constructor Puppet.Interpreter.Types.C1_2CurContainerDesc instance GHC.Generics.Constructor Puppet.Interpreter.Types.C1_1CurContainerDesc instance GHC.Generics.Constructor Puppet.Interpreter.Types.C1_0CurContainerDesc instance GHC.Generics.Datatype Puppet.Interpreter.Types.D1CurContainerDesc instance GHC.Generics.Constructor Puppet.Interpreter.Types.C1_2TopLevelType instance GHC.Generics.Constructor Puppet.Interpreter.Types.C1_1TopLevelType instance GHC.Generics.Constructor Puppet.Interpreter.Types.C1_0TopLevelType instance GHC.Generics.Datatype Puppet.Interpreter.Types.D1TopLevelType 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 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 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) -- | 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 Nil 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 PuppetDB.Remote -- | Given an URL (ie. http://localhost:8080), will return -- an incomplete PuppetDBAPI. pdbConnect :: Manager -> BaseUrl -> IO (Either PrettyError (PuppetDBAPI IO)) -- | A dummy implementation of PuppetDBAPI, that will return empty -- responses. module PuppetDB.Dummy dummyPuppetDB :: Monad m => PuppetDBAPI m 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 -- | 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 Expression to PValue. module Puppet.Interpreter.Resolve -- | A pure function for resolving variables. getVariable :: Container ScopeInformation -> Text -> Text -> Either Doc PValue -- | Turns a PValue into a Bool, 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 Expression into a -- PValue, if possible. resolveExpression :: Expression -> InterpreterMonad PValue -- | Resolves an UnresolvedValue (terminal for the Expression -- data type) into a PValue resolveValue :: UnresolvedValue -> InterpreterMonad PValue -- | Turns strings, numbers and booleans into Text, or throws an -- error. resolvePValueString :: PValue -> InterpreterMonad Text -- | Turns everything it can into a number, or throws an error resolvePValueNumber :: PValue -> InterpreterMonad Scientific -- |
-- resolveExpressionString = resolveExpression >=> resolvePValueString --resolveExpressionString :: Expression -> InterpreterMonad Text -- | Just like resolveExpressionString, 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 SearchExpression from the parser into a -- fully resolved RSearchExpression. resolveSearchExpression :: SearchExpression -> InterpreterMonad RSearchExpression -- | Checks whether a given Resource matches a -- RSearchExpression. 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 RSearchExpression 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 PValues into Numbers, 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 -- | 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) -- | 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 -- ResolvedInt or ResolvedBool 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 string validator. nameval :: Text -> NativeTypeValidate -- | Validate resources given a list of valid parameters: -- --
-- > dummyEval (resolveExpression (Addition "1" "2")) -- Right (PString "3") --module Puppet.Interpreter.Pure -- | Worst name ever, this is a set of pure stub for the -- ImpureMethods type. impurePure :: IoMethods Identity -- | A pure InterpreterReader, 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 ClassDeclaration, -- DefineDeclaration, Node and the spurious statements of -- TopContainer. _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 interpretMonad 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 definedResources (eg. all class declarations) are -- pulled out of the InterpreterState 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]) -- | 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 PDBType, will try return a sane default implementation. getDefaultDB :: PDBType -> IO (Either PrettyError (PuppetDBAPI IO)) -- | Turns a FinalCatalog and EdgeMap into a document that -- can be serialized and fed to puppet apply. generateWireCatalog :: NodeName -> FinalCatalog -> EdgeMap -> WireCatalog instance GHC.Classes.Eq PuppetDB.Common.PDBType instance GHC.Read.Read PuppetDB.Common.PDBType module Puppet.Stdlib -- | Contains the implementation of the StdLib functions. stdlibFunctions :: Container ([PValue] -> InterpreterMonad PValue) module Puppet.Preferences -- | generate default preferences dfPreferences :: FilePath -> IO (Preferences IO) class HasPreferences c_acpsx m_acpnU | c_acpsx -> m_acpnU 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_acpsx m_acpnU => Lens' c_acpsx (Preferences m_acpnU) prefExtFuncs :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx (Container ([PValue] -> InterpreterMonad PValue)) prefExternalmodules :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx (HashSet Text) prefExtraTests :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx Bool prefFactsDefault :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx (Container PValue) prefFactsOverride :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx (Container PValue) prefHieraPath :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx (Maybe FilePath) prefIgnoredmodules :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx (HashSet Text) prefKnowngroups :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx [Text] prefKnownusers :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx [Text] prefLogLevel :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx Priority prefNatTypes :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx (Container NativeTypeMethods) prefPDB :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx (PuppetDBAPI m_acpnU) prefPuppetPaths :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx PuppetDirPaths prefPuppetSettings :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx (Container Text) prefStrictness :: HasPreferences c_acpsx m_acpnU => Lens' c_acpsx 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_as29 where baseDir = (.) puppetDirPaths baseDir manifestPath = (.) puppetDirPaths manifestPath modulesPath = (.) puppetDirPaths modulesPath templatesPath = (.) puppetDirPaths templatesPath testPath = (.) puppetDirPaths testPath puppetDirPaths :: HasPuppetDirPaths c_as29 => Lens' c_as29 PuppetDirPaths baseDir :: HasPuppetDirPaths c_as29 => Lens' c_as29 FilePath manifestPath :: HasPuppetDirPaths c_as29 => Lens' c_as29 FilePath modulesPath :: HasPuppetDirPaths c_as29 => Lens' c_as29 FilePath templatesPath :: HasPuppetDirPaths c_as29 => Lens' c_as29 FilePath testPath :: HasPuppetDirPaths c_as29 => Lens' c_as29 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 -- | The module works in IO and throws a PrettyError 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 getCatalog: 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 : -- --
-- ssh -L 8080:localhost:8080 puppet.host --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