Safe Haskell | None |
---|---|
Language | Haskell98 |
- vmapM :: (Monad m, Foldable t) => (a -> m b) -> t a -> m [b]
- getModulename :: RIdentifier -> Text
- getCatalog :: Monad m => (forall a. InterpreterReader m -> InterpreterState -> InterpreterMonad a -> m (Either PrettyError a, InterpreterState, InterpreterWriter)) -> (TopLevelType -> Text -> m (Either PrettyError Statement)) -> (Either Text Text -> Text -> Container ScopeInformation -> m (Either PrettyError Text)) -> PuppetDBAPI m -> Text -> Facts -> Container NativeTypeMethods -> Container ([PValue] -> InterpreterMonad PValue) -> HieraQueryFunc m -> ImpureMethods m -> HashSet Text -> m (Pair (Either PrettyError (FinalCatalog, EdgeMap, FinalCatalog, [Resource])) [Pair Priority Doc])
- isParent :: Text -> CurContainerDesc -> InterpreterMonad Bool
- finalize :: [Resource] -> InterpreterMonad [Resource]
- popScope :: InterpreterMonad ()
- pushScope :: CurContainerDesc -> InterpreterMonad ()
- evalTopLevel :: Statement -> InterpreterMonad ([Resource], Statement)
- getstt :: TopLevelType -> Text -> InterpreterMonad ([Resource], Statement)
- extractPrism :: Prism' a b -> Doc -> a -> InterpreterMonad b
- computeCatalog :: Text -> InterpreterMonad (FinalCatalog, EdgeMap, FinalCatalog, [Resource])
- makeEdgeMap :: FinalCatalog -> InterpreterMonad EdgeMap
- realize :: [Resource] -> InterpreterMonad (Pair FinalCatalog FinalCatalog)
- evaluateNode :: Nd -> InterpreterMonad [Resource]
- evaluateStatementsVector :: Foldable f => f Statement -> InterpreterMonad [Resource]
- fromArgumentList :: [Pair Text a] -> InterpreterMonad (Container a)
- evaluateStatement :: Statement -> InterpreterMonad [Resource]
- loadVariable :: Text -> PValue -> InterpreterMonad ()
- loadParameters :: Foldable f => Container PValue -> f (Pair Text (Maybe Expression)) -> PPosition -> Maybe Text -> InterpreterMonad ()
- data ScopeEnteringContext
- enterScope :: ScopeEnteringContext -> CurContainerDesc -> Text -> PPosition -> InterpreterMonad Text
- dropInitialColons :: Text -> Text
- expandDefine :: Resource -> InterpreterMonad [Resource]
- loadClass :: Text -> Maybe Text -> Container PValue -> ClassIncludeType -> InterpreterMonad [Resource]
- addRelationship :: LinkType -> PValue -> Resource -> InterpreterMonad Resource
- addTagResource :: Resource -> Text -> Resource
- addAttribute :: OverrideType -> Text -> Resource -> PValue -> InterpreterMonad Resource
- registerResource :: Text -> Text -> Container PValue -> Virtuality -> PPosition -> InterpreterMonad [Resource]
- logWithModifier :: Priority -> (Doc -> Doc) -> [PValue] -> InterpreterMonad [Resource]
- mainFunctionCall :: Text -> [PValue] -> InterpreterMonad [Resource]
- evaluateHFC :: HFunctionCall -> InterpreterMonad [Resource]
Documentation
getModulename :: RIdentifier -> Text Source
:: Monad m | |
=> (forall a. InterpreterReader m -> InterpreterState -> InterpreterMonad a -> m (Either PrettyError a, InterpreterState, InterpreterWriter)) | A function that will interpret the InterpreterMonad and will convert it to something else (for example, |
-> (TopLevelType -> Text -> m (Either PrettyError Statement)) | get statements function |
-> (Either Text Text -> Text -> Container ScopeInformation -> m (Either PrettyError Text)) | compute template function |
-> PuppetDBAPI m | |
-> Text | Node name |
-> Facts | Facts ... |
-> Container NativeTypeMethods | List of native types |
-> Container ([PValue] -> InterpreterMonad PValue) | |
-> HieraQueryFunc m | Hiera query function |
-> ImpureMethods m | |
-> HashSet Text | The set of ignored modules |
-> m (Pair (Either PrettyError (FinalCatalog, EdgeMap, FinalCatalog, [Resource])) [Pair Priority Doc]) |
This is the main function for computing catalogs. It returns the result of the compulation (either an error, or a tuple containing all the resources, dependency map, exported resources, and defined resources (this last one might not be up to date and is only useful for code coverage tests)) along with all messages that have been generated by the compilation process.
isParent :: Text -> CurContainerDesc -> InterpreterMonad Bool Source
finalize :: [Resource] -> InterpreterMonad [Resource] Source
popScope :: InterpreterMonad () Source
pushScope :: CurContainerDesc -> InterpreterMonad () Source
evalTopLevel :: Statement -> InterpreterMonad ([Resource], Statement) Source
getstt :: TopLevelType -> Text -> InterpreterMonad ([Resource], Statement) Source
extractPrism :: Prism' a b -> Doc -> a -> InterpreterMonad b Source
computeCatalog :: Text -> InterpreterMonad (FinalCatalog, EdgeMap, FinalCatalog, [Resource]) Source
evaluateNode :: Nd -> InterpreterMonad [Resource] Source
evaluateStatementsVector :: Foldable f => f Statement -> InterpreterMonad [Resource] Source
fromArgumentList :: [Pair Text a] -> InterpreterMonad (Container a) Source
Converts a list of pairs into a container, checking there is no duplicate
loadVariable :: Text -> PValue -> InterpreterMonad () Source
loadParameters :: Foldable f => Container PValue -> f (Pair Text (Maybe Expression)) -> PPosition -> Maybe Text -> InterpreterMonad () Source
This function loads class and define parameters into scope. It checks that all mandatory parameters are set, that no extra parameter is declared.
It is able to fill unset parameters with values from Hiera (for classes only) or default values.
enterScope :: ScopeEnteringContext -> CurContainerDesc -> Text -> PPosition -> InterpreterMonad Text Source
Enters a new scope, checks it is not already defined, and inherits the defaults from the current scope
Inheriting the defaults is necessary for non native types, because they will be expanded in "finalize", so if this was not done, we would be expanding the defines without the defaults applied
dropInitialColons :: Text -> Text Source
:: Text | |
-> Maybe Text | Set if this is an inheritance load, so that we can set calling module properly |
-> Container PValue | |
-> ClassIncludeType | |
-> InterpreterMonad [Resource] |
addRelationship :: LinkType -> PValue -> Resource -> InterpreterMonad Resource Source
addTagResource :: Resource -> Text -> Resource Source
addAttribute :: OverrideType -> Text -> Resource -> PValue -> InterpreterMonad Resource Source
registerResource :: Text -> Text -> Container PValue -> Virtuality -> PPosition -> InterpreterMonad [Resource] Source
logWithModifier :: Priority -> (Doc -> Doc) -> [PValue] -> InterpreterMonad [Resource] Source
mainFunctionCall :: Text -> [PValue] -> InterpreterMonad [Resource] Source