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

Text.PCLT.MakeMessage

Description

Module around pcsi2text function, which generates a message out of PCSI and PCLT_Catalog.

Synopsis

Documentation

data SDL_DeterminationFailure Source

Error type for givenSDL_statisfies.

Constructors

RequiredCompositeIsMissing_SDLDF RequiredByRequirerCompositeIsMissing_PCLTE 
MissingParam_SDLByParamCompositeLink_SDLDF PCLT_CompositeKey PCLT_ParamKey

The SDL of template is specified (using PCLT_SDL_ToParamCompositeLink) to be the same as is one of a template, that must have been put under a parameter (using PCSI_PV), but referenced parameter is missing in given PCSI

WrongParamType_SDLByParamCompositeLink_SDLDF PCLT_CompositeKey PCLT_ParamKey

The SDL of template is specified (using PCLT_SDL_ToParamCompositeLink) to be the same as is one of a template, that must have been put under a parameter (using PCSI_PV), but referenced parameter value is constructed using not PCSI_PV.

UnknownComposite_SDLByParamCompositeLink_SDLDF PCLT_CompositeKey PCLT_ParamKey PCLT_CompositeKey

The SDL of template is specified (using PCLT_SDL_ToParamCompositeLink) to be the same as is one of a template, that must have been put under a parameter (using PCSI_PV), but the PCSI under this parameter references some unknown (to catalog) template.

SDLReferentialCycle_SDLDF PCLT_CompositeKey [PCLT_ID] 
ErrornousSDL_SDLDF PCLT_CompositeKey PCLT_ErrornousSDL 

shortOf_PCSI2Text_Error :: PCSI2Text_Error -> ByteStringSource

Template representation generation errors types abbreviations:

       RequiredCompositeIsMissing_P2TET            -> "CM"
       RequiredCompositeLoclizationIsMissing_P2TET -> "CLM"
       CompositionCycle_P2TET                      -> "CC"
       SDL_DeterminationFailure_P2TET       sdldft -> "SF" ++
           case sdldft of
               RequiredCompositeIsMissing_SDLDFT               -> "(CM)"
               MissingParam_SDLByParamCompositeLink_SDLDFT     -> "(LMP)"
               WrongParamType_SDLByParamCompositeLink_SDLDFT   -> "(LWPT)"
               UnknownComposite_SDLByParamCompositeLink_SDLDFT -> "(LUC)"
               SDLReferentialCycle_SDLDFT                      -> "(CC)"
               ErrornousSDL_SDLDFT                             -> "(ES)"
       UnsupportedMarker_P2TET                     -> "UM"
       NoValueForParameter_P2TET                   -> "NV"
       UnderAccordingParamReparsingFailure_P2TET   -> "RF"
       ReparsingDepthMaxReached_P2TET              -> "RDM"
       ReparsingLengthMaxReached_P2TET             -> "RLM"
       InstaniationLengthMaxReached_P2TET          -> "ILM"

includeAsAnError :: PCLT_InnerConfig -> PCSI2Text_Error -> String -> (ByteString, ForInstaniationUsedChunkLength)Source

Whenever representation generator can't make representation for a template due to some error, it puts there (instead of representation) an error marking (pcsMarkingErrorPlaceholderWrapper) with an abbreviation (see shortOf_PCSI2Text_Error) of error type and template ID.

givenSDL_statisfies :: ShowDetalizationLevel -> PCSI -> PCLT_ShowDetalizationLevel -> PCLT_CatalogMap -> Either SDL_DeterminationFailure BoolSource

A test, if a given reciever's detalization level is enough to represent a given PCSI.

pcsi2new_text :: PCSI -> (ShowDetalizationLevel, LanguageName) -> PCLT_Catalog -> (StdOut_CLBS, [ErrorWithPCSCatalog PCSI2Text_Error])Source

Wrapper around pcsi2text for cases, when new CLBS for output is to be created. It's maximal length is set to be same as configured in parameter pcsInstaniationResultMaxSize

pcsi2text :: StdOut_CLBS -> PCSI -> (ShowDetalizationLevel, LanguageName) -> PCLT_Catalog -> (StdOut_CLBS, [ErrorWithPCSCatalog PCSI2Text_Error])Source

Make a representation out of PCSI in specified detailization level, in specified language, using specified catalog. And append result to a specified CLBS.