Drasil icon indicating copy to clipboard operation
Drasil copied to clipboard

`symbols` vs `symbolsAll`: What?

Open balacij opened this issue 7 months ago • 3 comments

In many of our examples, we seem to have two lists: symbols and symbolsAll -- Why? What's the difference?

Related to #2873

@jackwyand Since we're probably both going to reach this at some point, I'm assigning it to both of us.

balacij avatar Jun 16 '25 18:06 balacij

git blame ?

JacquesCarette avatar Jun 17 '25 22:06 JacquesCarette

Seems to have been introduced in #1413 #1416 and #1420 .

JacquesCarette avatar Jun 17 '25 22:06 JacquesCarette

For later:

With SWHS, this patch does not affect stable/, passes our tests, and does nothing but remove symbols for symbolsAll (which contains all of symbols and more).

diff --git a/code/drasil-example/swhs/lib/Drasil/SWHS/Body.hs b/code/drasil-example/swhs/lib/Drasil/SWHS/Body.hs
index c2de3dd752..fcb92fd751 100755
--- a/code/drasil-example/swhs/lib/Drasil/SWHS/Body.hs
+++ b/code/drasil-example/swhs/lib/Drasil/SWHS/Body.hs
@@ -52,7 +52,7 @@ import Drasil.SWHS.Requirements (funcReqs, inReqDesc, nfRequirements,
 import Drasil.SWHS.TMods (tMods)
 import Drasil.SWHS.Unitals (coilHTC, coilSA, consTol, constrained,
   htFluxC, htFluxP, inputs, inputConstraints, outputs, pcmE, pcmHTC, pcmSA,
-  simTime, specParamValList, symbols, symbolsAll, tempC, tempPCM,
+  simTime, specParamValList, symbolsAll, tempC, tempPCM,
   tempW, thickness, watE)
 
 import System.Drasil (SystemKind(Specification), mkSystem)
@@ -75,7 +75,7 @@ si :: System
 si = mkSystem
   progName' Specification [thulasi, brooks, spencerSmith]
   [purp] [] [scope] [motivation]
-  symbols
+  symbolsAll
   tMods genDefs SWHS.dataDefs iMods
   []
   inputs outputs constrained specParamValList
@@ -103,7 +103,7 @@ conceptChunks =
   algorithm : thermocon ++ softwarecon ++ physicCon ++ mathcon ++
   physicalcon ++ con ++ srsDomains ++
   -- DefinedQuantityDicts
-  map cw symbols ++
+  map cw symbolsAll ++
   -- ConstQDefs
   map cw specParamValList
 
@@ -116,7 +116,7 @@ abbreviationsList =
   -- CIs
   nw progName : map nw acronymsFull ++
   -- DefinedQuantityDicts
-  map nw symbols
+  map nw symbolsAll
 
 -- | Holds all references and links used in the document.
 allRefs :: [Reference]
diff --git a/code/drasil-example/swhs/lib/Drasil/SWHS/Unitals.hs b/code/drasil-example/swhs/lib/Drasil/SWHS/Unitals.hs
index 1d8ea6094c..18de89603d 100644
--- a/code/drasil-example/swhs/lib/Drasil/SWHS/Unitals.hs
+++ b/code/drasil-example/swhs/lib/Drasil/SWHS/Unitals.hs
@@ -23,12 +23,9 @@ import Drasil.SWHS.Concepts (water, phsChgMtrl)
 
 import Control.Lens ((^.))
 
-symbols :: [DefinedQuantityDict]
-symbols = pi_ : map dqdWr units ++ map dqdWr unitless ++ map dqdWr constrained
- ++ map dqdWr unitalChuncks
-
 symbolsAll :: [DefinedQuantityDict]
-symbolsAll = symbols ++ map dqdWr specParamValList ++
+symbolsAll = pi_ : map dqdWr units ++ unitless ++ map dqdWr constrained
+  ++ map dqdWr unitalChuncks ++ map dqdWr specParamValList ++
   map dqdWr [htFusionMin, htFusionMax, coilSAMax] ++
   map dqdWr [absTol, relTol]
 -- Symbols with Units --

balacij avatar Jul 27 '25 18:07 balacij