PCLT-0.1: Extension to Show: templating, catalogizing, languages, parameters, etc.

Text.PCLT.PCSI

Contents

Description

The abbreviation "PCSI" means "Parametric Composable String Instaniation". Agree, not a very clear name, a more apropriate would be something like that: "Input Data for Template Representation", but clear name came to my head when millions (dozens) of ants (variables) were already bearing this name. And I'm a bit lazy to rename everything to sound apropriate, sorry.

Synopsis

Documentation

data PCLT_ParamVal Source

By these user fills parameters of templates.

Constructors

PlainText_PV String 
PlainTextLBS_PV ByteString 
PCSI_PV PCSI 
PCSIList_PV [PCSI] PCLT_ParamVal

Second argument is a separator between PCSIs in first argument Here representation generator automatically adds to each PCSI in list an implicit parameter __row_idx, which holds a value of current PCSI index in list, starting from 1.

PVList_PV [PCLT_ParamVal] 
Indented_PV Int PCLT_ParamVal

In message generation procedure this stands for a value of 2nd argument in which every occurence of newline (as is configured in Text.PCLT.Config in config's parameter pcsNewlineLBS) is substituded by newline ++ (replicate n ' '), where n is the 1st argument

NewLine_PV

In message generation procedure this stands for a value of pcsNewlineLBS parameter declared in Text.PCLT.Config. Different systems means different symbol sequences under "newline"...

Nothing_PV 

data PCSI Source

PCSI is an output of our extended Show (to which this package is dedicated). And an input to generate a message using catalog.

Instances

PCSI constructors

empPCSI :: PCLT_ID -> PCSISource

PCSI with an empty set of parameters values.

PCSI maths

Standards

usualSeparatorInPCSIList :: PCLT_ParamValSource

It's used in some places of package in errors' representations (in instances of ShowAsPCSI - class declared in Text.PCLT.ShowAsPCSI). usualSeparatorInPCSIList = PVList_PV [NewLine_PV, PlainText_PV |----, NewLine_PV]