b9-2.0.0: A tool and library for building virtual machine images.

Safe HaskellNone
LanguageHaskell2010

B9.Artifact.Content.StringTemplate

Description

Utility functions based on Template to offer $var variable expansion in string throughout a B9 artifact.

@deprecated

TODO remove this in the move to Dhall

Synopsis

Documentation

subst :: (Member ExcB9 e, Member EnvironmentReader e) => Text -> Eff e Text Source #

Text template substitution.

substStr :: (Member ExcB9 e, Member EnvironmentReader e) => String -> Eff e String Source #

String template substitution

withSubstitutedStringBindings :: (Member EnvironmentReader e, Member ExcB9 e) => [(String, String)] -> Eff e s -> Eff e s Source #

Extend an Environment with new bindings, where each value may contain string templates with like "Hello $name, how is life on $planet these days?".

Since: 0.5.64

data SourceFile Source #

A wrapper around a file path and a flag indicating if template variable expansion should be performed when reading the file contents.

Instances
Eq SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Data SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceFile -> c SourceFile #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceFile #

toConstr :: SourceFile -> Constr #

dataTypeOf :: SourceFile -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceFile) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceFile) #

gmapT :: (forall b. Data b => b -> b) -> SourceFile -> SourceFile #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceFile -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceFile -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceFile -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceFile -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceFile -> m SourceFile #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceFile -> m SourceFile #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceFile -> m SourceFile #

Read SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Show SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Generic SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Associated Types

type Rep SourceFile :: Type -> Type #

Arbitrary SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Hashable SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Binary SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

NFData SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Methods

rnf :: SourceFile -> () #

type Rep SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

data SourceFileConversion Source #

Instances
Eq SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Data SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceFileConversion -> c SourceFileConversion #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceFileConversion #

toConstr :: SourceFileConversion -> Constr #

dataTypeOf :: SourceFileConversion -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceFileConversion) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceFileConversion) #

gmapT :: (forall b. Data b => b -> b) -> SourceFileConversion -> SourceFileConversion #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceFileConversion -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceFileConversion -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceFileConversion -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceFileConversion -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceFileConversion -> m SourceFileConversion #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceFileConversion -> m SourceFileConversion #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceFileConversion -> m SourceFileConversion #

Read SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Show SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Generic SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Associated Types

type Rep SourceFileConversion :: Type -> Type #

Hashable SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Binary SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

NFData SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Methods

rnf :: SourceFileConversion -> () #

type Rep SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

type Rep SourceFileConversion = D1 (MetaData "SourceFileConversion" "B9.Artifact.Content.StringTemplate" "b9-2.0.0-4v7Psu2Zb0SKZH2VQDRc40" False) (C1 (MetaCons "NoConversion" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ExpandVariables" PrefixI False) (U1 :: Type -> Type))