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

Text.PCLT.MakeCatalog

Description

A module around comlex function _readPCLTCatalog.

Synopsis

Documentation

data ReadPCSCatalogError Source

Error type for _readPCLTCatalog.

Descriptios for some value constructors:

_readPCLTCatalog :: (PCLT_Catalog, [ReadPCSCatalogError]) -> PCLT_RawCatalogData -> (PCLT_Catalog, [ErrorWithPCSCatalog ReadPCSCatalogError])Source

Take a bunch of raw templates, parse them into normal templates and add them to a catalog.

normalizeReferentialSDLs :: PCLT_CatalogMap -> (PCLT_CatalogMap, [DRL_NormalizationError])Source

Under "Referential SDLs normalization" here is understood the following. Now consider paths like:

 Tpl_1.pcltRequiredSDL -> Tpl_2.pcltRequiredSDL

which means pcltRequiredSDL of Tpl_1 is specified (using PCLT_SDL_ToTemplateLink) to be the same as for Tpl_2. Here we can reduce the PCLT_SDL_ToTemplateLink of Tpl_1 by assinging instead of it Tpl_2.pcltRequiredSDL value. Data consistency is respected. We win in speed of Tpl_1.pcltRequiredSDL determination. The negative side of this, is that we can't change Tpl_2.pcltRequiredSDL anymore without spoiling data consistency. That's another reason why a PCLT catalog is so hard to modify. Perhaps the problem will be solved in future versions of PCLT.

So this function reduces all PCLT_SDL_ToTemplateLinks in a given PCLT_CatalogMap, BUT, only where they lead to PCLT_SDLs or to other PCLT_SDL_ToTemplateLinks (which recursively gets considered to be reduced), not when it leads to PCLT_SDL_ToParamCompositeLink or PCLT_SDL_Errornous.