Lacking Clarity (and Consistency): Table of Symbols Constructors #1658
Labels
needs-action-items
A clear 'path to resolution' is needed to close any ticket.
needs-clarification
Needs a clear 'state', 'goal', 'analysis', and 'explanation' to reduce solution ambiguities.
Table of Symbols Constructors are in an odd place.
Drasil/code/drasil-docLang/Drasil/DocumentLanguage.hs
Lines 78 to 83 in f43b3c1
Drasil/code/drasil-docLang/Drasil/DocumentLanguage.hs
Lines 119 to 124 in f43b3c1
The Constructors seem fairly logical. A simple constructor, and a more customizable one. While this is something that could benefit from a smart constructor, it isn't something of super high priority.
If we look at what the constructors do to create the table of symbols, the lack of clarity (should) become[s] clear.
Drasil/code/drasil-docLang/Drasil/DocumentLanguage.hs
Lines 267 to 274 in f43b3c1
Drasil/code/drasil-docLang/Drasil/DocumentLanguage.hs
Lines 279 to 293 in f43b3c1
Drasil/code/drasil-database/Database/Drasil/SystemInformation.hs
Lines 23 to 31 in f43b3c1
A
TSymb
constructor takes all members of the_quant
field to print. This can be something such as a[QuantityDict]
or[DefinedQuantityDict]
. Nothing too wrong with this constructor, although it could be a great candidate for automation.Looking that the other constructor,
TSymb'
(and related function --mkTSymb
), we can see that an additional constraint is required:Concept
. As a result of this, the_quants
field is not pulled as it doesn't contain theConcept
constraint, instead the_concepts
field ofSystemInformation
is used. With this being the case, we cannot enumerate symbols which are missing aConcept
. This alienatesQuantityDict
,UnitaryChunk
(which GlassBR makes heavy use of), among others. The upside is, with theTSymb'
constructor, symbols are pulled automatically from the document.This restriction seems a (little) arbitrary and hacky, especially if
LFunc
isTerm
. We are left with some symbols (possibly) being excluded. Moreover, it seems odd that if we want to describe theterm
of a symbol we can get "all" symbols, whereas when we describedefn
we may only display a subset.TL;DR: Is it intentional that
TSymb'
takes a subset of all symbols and thus a Table of Symbols would be "incomplete"?The text was updated successfully, but these errors were encountered: