language-puppet-1.4.3: 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 #

data CompRegex #

Constructors

CompRegex !Text !Regex 
Instances
Eq CompRegex # 
Instance details

Defined in Puppet.Language.Core

Show CompRegex # 
Instance details

Defined in Puppet.Language.Core

ToJSON CompRegex # 
Instance details

Defined in Puppet.Language.Core

FromJSON CompRegex # 
Instance details

Defined in Puppet.Language.Core

Pretty CompRegex # 
Instance details

Defined in Puppet.Language.Core

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 # 
Instance details

Defined in Puppet.Language.Resource

Ord RIdentifier # 
Instance details

Defined in Puppet.Language.Resource

Show RIdentifier # 
Instance details

Defined in Puppet.Language.Resource

Generic RIdentifier # 
Instance details

Defined in Puppet.Language.Resource

Associated Types

type Rep RIdentifier :: Type -> Type #

Hashable RIdentifier # 
Instance details

Defined in Puppet.Language.Resource

ToJSON RIdentifier # 
Instance details

Defined in Puppet.Language.Resource

FromJSON RIdentifier # 
Instance details

Defined in Puppet.Language.Resource

Pretty RIdentifier # 
Instance details

Defined in Puppet.Language.Resource

HasRIdentifier RIdentifier # 
Instance details

Defined in Puppet.Language.Resource

type Rep RIdentifier # 
Instance details

Defined in Puppet.Language.Resource

type Rep RIdentifier = D1 (MetaData "RIdentifier" "Puppet.Language.Resource" "language-puppet-1.4.3-7zVh5acsLsAHGmjw6K5UvK" False) (C1 (MetaCons "RIdentifier" PrefixI True) (S1 (MetaSel (Just "_itype") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_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 # 
Instance details

Defined in Puppet.Language.Resource

Show LinkType # 
Instance details

Defined in Puppet.Language.Resource

Generic LinkType # 
Instance details

Defined in Puppet.Language.Resource

Associated Types

type Rep LinkType :: Type -> Type #

Methods

from :: LinkType -> Rep LinkType x #

to :: Rep LinkType x -> LinkType #

Hashable LinkType # 
Instance details

Defined in Puppet.Language.Resource

Methods

hashWithSalt :: Int -> LinkType -> Int #

hash :: LinkType -> Int #

ToJSON LinkType # 
Instance details

Defined in Puppet.Language.Resource

FromJSON LinkType # 
Instance details

Defined in Puppet.Language.Resource

Pretty LinkType # 
Instance details

Defined in Puppet.Language.Resource

Methods

pretty :: LinkType -> Doc #

prettyList :: [LinkType] -> Doc #

type Rep LinkType # 
Instance details

Defined in Puppet.Language.Resource

type Rep LinkType = D1 (MetaData "LinkType" "Puppet.Language.Resource" "language-puppet-1.4.3-7zVh5acsLsAHGmjw6K5UvK" False) ((C1 (MetaCons "RRequire" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "RBefore" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "RNotify" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "RSubscribe" PrefixI False) (U1 :: Type -> Type)))

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.

Instances
Eq Virtuality # 
Instance details

Defined in Puppet.Language.Resource

Show Virtuality # 
Instance details

Defined in Puppet.Language.Resource

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 # 
Instance details

Defined in Puppet.Language.Resource

Ord CurContainerDesc # 
Instance details

Defined in Puppet.Language.Resource

Show CurContainerDesc # 
Instance details

Defined in Puppet.Language.Resource

Generic CurContainerDesc # 
Instance details

Defined in Puppet.Language.Resource

Associated Types

type Rep CurContainerDesc :: Type -> Type #

Pretty CurContainerDesc # 
Instance details

Defined in Puppet.Language.Resource

type Rep CurContainerDesc # 
Instance details

Defined in Puppet.Language.Resource

data PValue #

A puppet value.

Instances
Eq PValue # 
Instance details

Defined in Puppet.Language.Value

Methods

(==) :: PValue -> PValue -> Bool #

(/=) :: PValue -> PValue -> Bool #

Show PValue # 
Instance details

Defined in Puppet.Language.Value

IsString PValue # 
Instance details

Defined in Puppet.Language.Value

Methods

fromString :: String -> PValue #

ToJSON PValue # 
Instance details

Defined in Puppet.Language.Value

FromJSON PValue # 
Instance details

Defined in Puppet.Language.Value

Pretty PValue # 
Instance details

Defined in Puppet.Language.Value

Methods

pretty :: PValue -> Doc #

prettyList :: [PValue] -> Doc #

FromRuby PValue # 
Instance details

Defined in Puppet.Language.Value

ToRuby PValue # 
Instance details

Defined in Puppet.Language.Value

Methods

toRuby :: PValue -> IO RValue #

AsNumber PValue # 
Instance details

Defined in Puppet.Language.Value

Pretty (HashMap Text PValue) # 
Instance details

Defined in Puppet.Language.Value