Safe Haskell | Safe-Infered |
---|
- type Catalog = [CResource]
- type Facts = Map String ResolvedValue
- data LinkType
- = RNotify
- | RRequire
- | RBefore
- | RSubscribe
- data ResolvedValue
- = ResolvedString !String
- | ResolvedRegexp !String
- | ResolvedInt !Integer
- | ResolvedDouble !Double
- | ResolvedBool !Bool
- | ResolvedRReference !String !ResolvedValue
- | ResolvedArray ![ResolvedValue]
- | ResolvedHash ![(String, ResolvedValue)]
- | ResolvedUndefined
- type GeneralValue = Either Expression ResolvedValue
- type GeneralString = Either Expression String
- data CResource = CResource {
- crid :: Int
- crname :: GeneralString
- crtype :: String
- crparams :: [(GeneralString, GeneralValue)]
- crvirtuality :: Virtuality
- pos :: SourcePos
- type ResIdentifier = (String, String)
- type Relation = (LinkType, ResIdentifier)
- data RResource = RResource {}
- type FinalCatalog = Map ResIdentifier RResource
- type ScopeName = String
- data RelUpdateType
- data ResDefaults
- data ScopeState = ScopeState {
- curScope :: ![[ScopeName]]
- curVariables :: !(Map String (GeneralValue, SourcePos))
- curClasses :: !(Map String SourcePos)
- curDefaults :: ![ResDefaults]
- curResId :: !Int
- curPos :: !SourcePos
- nestedtoplevels :: !(Map (TopLevelType, String) Statement)
- getStatementsFunction :: TopLevelType -> String -> IO (Either String Statement)
- getWarnings :: ![String]
- curCollect :: ![CResource -> CatalogMonad Bool]
- unresolvedRels :: ![([(LinkType, GeneralValue, GeneralValue)], (String, GeneralString), RelUpdateType, SourcePos)]
- computeTemplateFunction :: String -> String -> [(String, GeneralValue)] -> IO (Either String String)
- type CatalogMonad = ErrorT String (StateT ScopeState IO)
- generalizeValueE :: Expression -> GeneralValue
- generalizeValueR :: ResolvedValue -> GeneralValue
- generalizeStringE :: Expression -> GeneralString
- generalizeStringS :: String -> GeneralString
- metaparameters :: Set [Char]
Documentation
type Facts = Map String ResolvedValueSource
Relationship link type.
data ResolvedValue Source
The list of resolved values that are used to define everything in a
FinalCatalog
and in the resolved parts of a Catalog
. They are to be
compared with the Value
s.
type GeneralValue = Either Expression ResolvedValueSource
This type holds a value that is either from the ASL or fully resolved.
type GeneralString = Either Expression StringSource
This type holds a value that is either from the ASL or a fully resolved String.
This describes the resources before the final resolution. This is required
as they must somehow be collected while the Statement
s are interpreted, but
the necessary Expression
s are not yet available. This is because in Puppet the
Statement
order should not alter the catalog's content.
The relations are not stored here, as they are pushed into a separate internal data structure by the interpreter.
CResource | |
|
type ResIdentifier = (String, String)Source
Resource identifier, made of a type, name pair.
type Relation = (LinkType, ResIdentifier)Source
Resource relation, made of a LinkType
, ResIdentifier
pair.
This is a fully resolved resource that will be used in the FinalCatalog
.
data RelUpdateType Source
Type of update/override, so they can be applied in the correct order. This part is probably not behaving like vanilla puppet, as it turns out this are many fairly acceptable behaviours and the correct one is not documented.
data ResDefaults Source
A data type to hold defaults values
data ScopeState Source
The most important data structure for the interpreter. It stores its internal state.
ScopeState | |
|
type CatalogMonad = ErrorT String (StateT ScopeState IO)Source
The monad all the interpreter lives in. It is ErrorT
with a state.
metaparameters :: Set [Char]Source
This is the set of meta parameters