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

Safe HaskellNone
LanguageHaskell98

Puppet.Language

Description

General puppet language specification.

This module doesn't depend on any other project modules (except for XPrelude). It serves as a common bridge that can be used in PuppetDB or Facter as well as in Puppet.Interpreter or Puppet.Parser.

Synopsis

Documentation

showPPos :: PPosition -> Doc #

showing the first position of a position interval.

showPPos' :: PPosition -> String #

showing the first position of a position interval as string.

initialPPos :: FilePath -> PPosition #

Generates an initial position interval based on a filename.

type PPosition = Pair Position Position #

A pair containing the start and end of a given token.

type Position = SourcePos #

Position in a puppet file. Currently an alias to SourcePos.

type NodeName = Text #

type Scope = Text #

stringEscape :: Text -> Text #

Extremely hacky escaping system for text values.

capitalizeR :: Text -> Doc #

Capitalize resource type and convert into a Doc.

capitalizeRT :: Text -> Text #

Properly capitalizes resource types.

containerComma'' :: Pretty a => [(Doc, a)] -> Doc #

containerComma' :: Pretty a => [(Doc, a)] -> Doc #

toPPos :: Text -> Int -> PPosition #

Generates a PPosition based on a filename and line number.

baseNativeTypes :: Container NativeTypeMethods #

The map of native types.

data NativeTypeMethods #

Attributes (and providers) of a puppet resource type bundled with validation rules

data PuppetDirPaths #

Constructors

PuppetDirPaths 

Fields

data Resource #

A fully resolved puppet resource that will be used in the FinalCatalog.

Constructors

Resource 

Fields

data RIdentifier #

In Puppet, a resource is identified by a name and a type.

Constructors

RIdentifier 

Fields

Instances

Eq RIdentifier # 
Ord RIdentifier # 
Show RIdentifier # 
Generic RIdentifier # 

Associated Types

type Rep RIdentifier :: * -> * #

Hashable RIdentifier # 
ToJSON RIdentifier # 
FromJSON RIdentifier # 
Pretty RIdentifier # 
HasRIdentifier RIdentifier # 
type Rep RIdentifier # 
type Rep RIdentifier = D1 * (MetaData "RIdentifier" "Puppet.Language.Resource" "language-puppet-1.3.19-E5GvKpRNireIAt8kFBmKBu" False) (C1 * (MetaCons "RIdentifier" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_itype") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_iname") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))

data LinkType #

Relationship/ordering between resources.

Constructors

RRequire

Applies a resource after the target resource.

RBefore

Applies a resource before the target resource.

RNotify

Applies a resource before the target resource. The target resource refreshes if the notifying resource changes.

RSubscribe

Applies a resource after the target resource. The subscribing resource refreshes if the target resource changes.

Instances

Eq LinkType # 
Show LinkType # 
Generic LinkType # 

Associated Types

type Rep LinkType :: * -> * #

Methods

from :: LinkType -> Rep LinkType x #

to :: Rep LinkType x -> LinkType #

Hashable LinkType # 

Methods

hashWithSalt :: Int -> LinkType -> Int #

hash :: LinkType -> Int #

ToJSON LinkType # 
FromJSON LinkType # 
Pretty LinkType # 

Methods

pretty :: LinkType -> Doc #

prettyList :: [LinkType] -> Doc #

type Rep LinkType # 
type Rep LinkType = D1 * (MetaData "LinkType" "Puppet.Language.Resource" "language-puppet-1.3.19-E5GvKpRNireIAt8kFBmKBu" False) ((:+:) * ((:+:) * (C1 * (MetaCons "RRequire" PrefixI False) (U1 *)) (C1 * (MetaCons "RBefore" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "RNotify" PrefixI False) (U1 *)) (C1 * (MetaCons "RSubscribe" PrefixI False) (U1 *))))

data Virtuality #

Constructors

Normal

Normal resource, that will be included in the catalog.

Virtual

Type for virtual resources.

Exported

Type for exported resources.

ExportedRealized

These are resources that are exported AND realized in the catalog.

data CurContainerDesc #

Constructors

ContRoot

Contained at node or root level.

ContClass !Text

Contained in a class.

ContDefine !Text !Text !PPosition

Contained in a define, along with the position where this define was ... defined

ContImported !CurContainerDesc

Dummy container for imported resources, so that we know we must update the nodename

ContImport !NodeName !CurContainerDesc

This one is used when finalizing imported resources, and contains the current node name

Instances

Eq CurContainerDesc # 
Ord CurContainerDesc # 
Show CurContainerDesc # 
Generic CurContainerDesc # 
Pretty CurContainerDesc # 
type Rep CurContainerDesc #