diff --git a/code/drasil-data/Data/Drasil/Concepts/Documentation.hs b/code/drasil-data/Data/Drasil/Concepts/Documentation.hs index 4700366206..7b4a0d9acb 100644 --- a/code/drasil-data/Data/Drasil/Concepts/Documentation.hs +++ b/code/drasil-data/Data/Drasil/Concepts/Documentation.hs @@ -25,7 +25,7 @@ doccon = [abbAcc, abbreviation, acronym, analysis, appendix, aspect, body, charO organization, output_, physical, physicalConstraint, physicalProperty, physicalSim, physicalSystem, physics, plan, practice, priority, problem, problemDescription, prodUCTable, productUC, product_, project, propOfCorSol, property, prpsOfDoc, - purpose, quantity, realtime, reference, refmat, reqInput, requirement_, response, result, + purpose, quantity, realtime, reference, refMat, reqInput, requirement_, response, result, reviewer, safety, safetyReq, scenario, scope, scpOfReq, scpOfTheProjS, second_, section_, simulation, software, softwareConstraint, softwareDoc, softwareReq, softwareSys, softwareVAV, softwareVerif, solution, solutionCharSpec, @@ -214,7 +214,7 @@ year = nc "year" (cn' "year" ) scpOfTheProjS = nc "scpOfTheProj" (cn' "scope of the project") -- temporary generated for test -abbAcc, charOfIR, consVals, corSol, orgOfDoc, propOfCorSol, prpsOfDoc, refmat, +abbAcc, charOfIR, consVals, corSol, orgOfDoc, propOfCorSol, prpsOfDoc, refMat, reqInput, scpOfReq, tAuxConsts, tOfSymb, tOfUnit, termAndDef, traceyMandG, vav, tOfCont :: NamedChunk @@ -225,7 +225,7 @@ charOfIR = nc "charOfIR" (characteristic `of_PS` intReader) orgOfDoc = nc "orgOfDoc" (organization `of_` document) propOfCorSol = nc "propOfCorSol" (property `ofAPS` corSol) prpsOfDoc = nc "prpsOfDoc" (purpose `of_` document) -refmat = nc "refmat" (cn' "reference material") +refMat = nc "refMat" (cn' "reference material") reqInput = nc "ReqInputs" (cn' "required input") scpOfReq = nc "scpOfReq" (scope `of_` requirement) tAuxConsts = nc "TAuxConsts" (cn' "auxiliary constant") diff --git a/code/drasil-docLang/Drasil/DocLang/References.hs b/code/drasil-docLang/Drasil/DocLang/References.hs index 64836cd03b..28adc7536e 100644 --- a/code/drasil-docLang/Drasil/DocLang/References.hs +++ b/code/drasil-docLang/Drasil/DocLang/References.hs @@ -3,7 +3,7 @@ module Drasil.DocLang.References (secRefs) where import Drasil.DocLang.SRS import Drasil.DocumentLanguage.Core (getTraceConfigUID) -import Drasil.Sections.TableOfAbbAndAcronyms (tableAbbAccRef, tableAbbAccLabel) +import Drasil.Sections.TableOfAbbAndAcronyms (tableAbbAccRef) import Drasil.Sections.TableOfSymbols (symbTableRef) import Drasil.Sections.TableOfUnits (unitTableRef) import Drasil.Sections.TraceabilityMandGs (traceMatAssumpAssump, traceMatAssumpOther, traceMatRefinement) @@ -15,6 +15,7 @@ import Language.Drasil secRefs :: [Reference] -secRefs = sectionReferences ++ [tableAbbAccRef, tableAbbAccLabel, - reqInputsRef, symbTableRef, unitTableRef, tableOfConstantsRef, tInDataCstRef, tOutDataCstRef] - ++ map (ref.makeTabRef.getTraceConfigUID) [traceMatAssumpAssump, traceMatAssumpOther, traceMatRefinement] \ No newline at end of file +secRefs = sectionReferences ++ [tableAbbAccRef, reqInputsRef, symbTableRef, + unitTableRef, tableOfConstantsRef, tInDataCstRef, tOutDataCstRef] + ++ map (ref.makeTabRef.getTraceConfigUID) [traceMatAssumpAssump, + traceMatAssumpOther, traceMatRefinement] \ No newline at end of file diff --git a/code/drasil-docLang/Drasil/DocLang/SRS.hs b/code/drasil-docLang/Drasil/DocLang/SRS.hs index ac01381258..6ebfcd2ab6 100644 --- a/code/drasil-docLang/Drasil/DocLang/SRS.hs +++ b/code/drasil-docLang/Drasil/DocLang/SRS.hs @@ -1,16 +1,19 @@ -module Drasil.DocLang.SRS where - --- whole module used? -{-(appendix, assumpt, assumptLabel, charOfIR, datCon, - datConLabel, dataDefn, dataDefnLabel, doc, doc', funcReq, funcReqLabel, genDefn, - genDefnLabel, genSysDes, goalStmt, inModel, inModelLabel, indPRCase, - indPRCaseLabel, intro, likeChg, likeChgLabel, nonfuncReq, offShelfSol, orgOfDoc, - physSyst, physSystLabel, probDesc, prodUCTable, propCorSol, prpsOfDoc, reference, - referenceLabel, require, scpOfReq, scpOfTheProj, solCharSpec, solCharSpecLabel, - specSysDes, stakeholder, sysCon, sysCont, tOfCont, tOfContLabel, tOfSymb, - tOfSymbLabel, tOfUnit, termAndDefn, termogy, thModel, thModelLabel, theClient, - theCustomer, traceyMandG, unlikeChg, unlikeChgLabel, userChar, valsOfAuxCons, - valsOfAuxConsLabel, refMatLabel, tOfAbbAccLabel, sectionReferences)-} +module Drasil.DocLang.SRS (doc, doc', + tOfCont, refMat, tOfUnit, tOfSymb, tOfAbbAcc, intro, prpsOfDoc, scpOfReq, + charOfIR, orgOfDoc, stakeholder, theCustomer, theClient, genSysDes, sysCont, + userChar, sysCon, specSysDes, probDesc, termAndDefn, physSyst, goalStmt, + solCharSpec, assumpt, thModel, genDefn, dataDefn, inModel, datCon, propCorSol, + require, nonfuncReq, funcReq, likeChg, unlikeChg, traceyMandG, valsOfAuxCons, + reference, appendix, offShelfSol, scpOfTheProj, prodUCTable, indPRCase, + termogy,tOfContLabel, refMatLabel, tOfUnitLabel, tOfSymbLabel, tOfAbbAccLabel, + introLabel, docPurposeLabel, reqsScopeLabel, readerCharsLabel, docOrgLabel, + stakeholderLabel, clientLabel, customerLabel, genSysDescLabel, sysContextLabel, + userCharsLabel, sysConstraintsLabel, specSystDescLabel, physSystLabel, probDescLabel, + termDefsLabel, goalStmtLabel, solCharSpecLabel, assumptLabel, thModelLabel, + genDefnLabel, dataDefnLabel, inModelLabel, datConLabel, corSolPropsLabel, requirementsLabel, + funcReqLabel, nonfuncReqLabel, likeChgLabel, unlikeChgLabel, traceMatricesLabel, + valsOfAuxConsLabel, referenceLabel, appendixLabel, offShelfSolnsLabel, indPRCaseLabel, + projScopeLabel, useCaseTableLabel, terminologyLabel, sectionReferences) where --Temporary file for keeping the "srs" document constructor until I figure out -- a better place for it. Maybe Data.Drasil or Language.Drasil.Template? @@ -27,7 +30,7 @@ import qualified Data.Drasil.Concepts.Documentation as Doc (appendix, assumption prodUCTable, problemDescription, propOfCorSol, prpsOfDoc, reference, requirement, scpOfReq, scpOfTheProj, solutionCharSpec, specificsystemdescription, srs, stakeholder, sysCont, systemConstraint, termAndDef, terminology, traceyMandG, - tOfCont, tOfSymb, tOfUnit, userCharacteristic, refMat) + tOfCont, tOfSymb, tOfUnit, userCharacteristic, refMat, abbAcc) import qualified Data.Drasil.TheoryConcepts as Doc (dataDefn, genDefn, inModel, thModel) @@ -39,13 +42,27 @@ doc sys = Document (Doc.srs `S.forTPS` sys) -- | Similar to 'doc', but uses plural form of @systems@ in the title. doc' sys = Document (Doc.srs `S.forTPP` sys) +-- Ordered by appearance in SRS. -- | Standard SRS section builders. -intro, prpsOfDoc, scpOfReq, charOfIR, orgOfDoc, stakeholder, theCustomer, theClient, - genSysDes, sysCont, userChar, sysCon, scpOfTheProj, prodUCTable, indPRCase, specSysDes, - probDesc, termAndDefn, termogy, physSyst, goalStmt, solCharSpec, assumpt, thModel, - genDefn, inModel, dataDefn, datCon, propCorSol, require, nonfuncReq, funcReq, likeChg, - unlikeChg, traceyMandG, valsOfAuxCons, appendix, reference, offShelfSol, tOfCont, - tOfSymb, tOfUnit :: [Contents] -> [Section] -> Section +tOfCont, refMat, tOfUnit, tOfSymb, tOfAbbAcc, intro, prpsOfDoc, scpOfReq, + charOfIR, orgOfDoc, stakeholder, theCustomer, theClient, genSysDes, sysCont, + userChar, sysCon, specSysDes, probDesc, termAndDefn, physSyst, goalStmt, + solCharSpec, assumpt, thModel, genDefn, dataDefn, inModel, datCon, propCorSol, + require, nonfuncReq, funcReq, likeChg, unlikeChg, traceyMandG, valsOfAuxCons, + reference, appendix, offShelfSol, scpOfTheProj, prodUCTable, indPRCase, + termogy :: [Contents] -> [Section] -> Section + +-- | Table of Contents section. +tOfCont cs ss = section (titleize' Doc.tOfCont) cs ss tOfContLabel + +-- | Reference Material section. +refMat cs ss = section (titleize Doc.refMat) cs ss refMatLabel +-- | Table of Units section. +tOfUnit cs ss = section (titleize' Doc.tOfUnit) cs ss tOfUnitLabel +-- | Table of Symbols section. +tOfSymb cs ss = section (titleize' Doc.tOfSymb) cs ss tOfSymbLabel +-- | Table of Abbreviations and Acronyms section. +tOfAbbAcc cs ss = section (titleize' Doc.abbAcc) cs ss tOfAbbAccLabel -- | Introduction section. intro cs ss = section (titleize Doc.introduction) cs ss introLabel @@ -74,25 +91,18 @@ userChar cs ss = section (titleize' Doc.userCharacteristic) cs ss use -- | System Constraints section. sysCon cs ss = section (titleize' Doc.systemConstraint) cs ss sysConstraintsLabel --- | Scope of the Project section. -scpOfTheProj cs ss = section (atStart (Doc.scpOfTheProj titleize)) cs ss projScopeLabel --- | Product Use Case Table section. -prodUCTable cs ss = section (titleize Doc.prodUCTable) cs ss useCaseTableLabel --- | Individual Product Use Case section. -indPRCase cs ss = section (titleize' Doc.indPRCase) cs ss indPRCaseLabel - -- | Specific System Description section. specSysDes cs ss = section (titleize Doc.specificsystemdescription) cs ss specSystDescLabel + -- | Problem Description section. probDesc cs ss = section (titleize Doc.problemDescription) cs ss probDescLabel -- | Terminology and Definitions section. termAndDefn cs ss = section (titleize' Doc.termAndDef) cs ss termDefsLabel --- | Terminology section. -termogy cs ss = section (titleize Doc.terminology) cs ss terminologyLabel -- | Physical System Description section. physSyst cs ss = section (titleize Doc.physSyst) cs ss physSystLabel -- | Goal Statement section. goalStmt cs ss = section (titleize' Doc.goalStmt) cs ss goalStmtLabel + -- | Solution Characteristics Specification section. solCharSpec cs ss = section (titleize Doc.solutionCharSpec) cs ss solCharSpecLabel -- | Assumptions section. @@ -101,13 +111,12 @@ assumpt cs ss = section (titleize' Doc.assumption) cs ss ass thModel cs ss = section (titleize' Doc.thModel) cs ss thModelLabel -- | General Definitions section. genDefn cs ss = section (titleize' Doc.genDefn) cs ss genDefnLabel --- | Instance Models section. -inModel cs ss = section (titleize' Doc.inModel) cs ss inModelLabel -- | Data Definitions section. dataDefn cs ss = section (titleize' Doc.dataDefn) cs ss dataDefnLabel +-- | Instance Models section. +inModel cs ss = section (titleize' Doc.inModel) cs ss inModelLabel -- | Data Constraints section. datCon cs ss = section (titleize' Doc.datumConstraint) cs ss datConLabel - -- | Properties of a Correct Solution section. propCorSol cs ss = section (titleize' Doc.propOfCorSol) cs ss corSolPropsLabel @@ -127,92 +136,101 @@ unlikeChg cs ss = section (titleize' Doc.unlikelyChg) cs ss unl traceyMandG cs ss = section (titleize' Doc.traceyMandG) cs ss traceMatricesLabel -- | Values of Auxiliary Constants section. valsOfAuxCons cs ss = section (titleize Doc.consVals) cs ss valsOfAuxConsLabel --- | Appendix section. -appendix cs ss = section (titleize Doc.appendix) cs ss appendixLabel - -- | References section. reference cs ss = section (titleize' Doc.reference) cs ss referenceLabel +-- | Appendix section. +appendix cs ss = section (titleize Doc.appendix) cs ss appendixLabel -- | Off-the-Shelf Solutions section. offShelfSol cs ss = section (titleize' Doc.offShelfSolution) cs ss offShelfSolnsLabel --- | Reference Material section. -refMat cs ss = section (titleize Doc.refMat) cs ss refMatLabel --- | Table of Contents section. -tOfCont cs ss = section (titleize Doc.tOfCont) cs ss tOfContLabel --- | Table of Symbols section. -tOfSymb cs ss = section (titleize' Doc.tOfSymb) cs ss tOfSymbLabel --- | Table of Units section. -tOfUnit cs ss = section (titleize' Doc.tOfUnit) cs ss tOfUnitLabel --- | Table of Abbreviations and Acronyms section. -tOfAbbAcc cs ss = section (titleize' Doc.abbAcc) cs ss tOfAbbAccLabel +-- Unused +-- | Scope of the Project section. +scpOfTheProj cs ss = section (atStart (Doc.scpOfTheProj titleize)) cs ss projScopeLabel +-- | Product Use Case Table section. +prodUCTable cs ss = section (titleize Doc.prodUCTable) cs ss useCaseTableLabel +-- | Individual Product Use Case section. +indPRCase cs ss = section (titleize' Doc.indPRCase) cs ss indPRCaseLabel +-- | Terminology section. +termogy cs ss = section (titleize Doc.terminology) cs ss terminologyLabel --Labels-- -- | Collections all 'Section' 'Reference's. sectionReferences :: [Reference] -sectionReferences = [physSystLabel, datConLabel, genDefnLabel, thModelLabel, dataDefnLabel, - inModelLabel, likeChgLabel, tOfContLabel, tOfSymbLabel, tOfUnitLabel, valsOfAuxConsLabel, referenceLabel, - indPRCaseLabel, unlikeChgLabel, assumptLabel, funcReqLabel, nonfuncReqLabel, - solCharSpecLabel, introLabel, docPurposeLabel, reqsScopeLabel, readerCharsLabel, - docOrgLabel, stakeholderLabel, customerLabel, clientLabel, genSysDescLabel, - sysContextLabel, userCharsLabel, sysConstraintsLabel, projScopeLabel, useCaseTableLabel, - specSystDescLabel, probDescLabel, termDefsLabel, terminologyLabel, goalStmtLabel, - corSolPropsLabel, requirementsLabel, traceMatricesLabel, - appendixLabel, offShelfSolnsLabel, refMatLabel, tOfAbbAccLabel] +sectionReferences = [tOfContLabel, refMatLabel, tOfUnitLabel, tOfSymbLabel, tOfAbbAccLabel, + introLabel, docPurposeLabel, reqsScopeLabel, readerCharsLabel, docOrgLabel, + stakeholderLabel, clientLabel, customerLabel, genSysDescLabel, sysContextLabel, + userCharsLabel, sysConstraintsLabel, specSystDescLabel, physSystLabel, probDescLabel, + termDefsLabel, goalStmtLabel, solCharSpecLabel, assumptLabel, thModelLabel, + genDefnLabel, dataDefnLabel, inModelLabel, datConLabel, corSolPropsLabel, requirementsLabel, + funcReqLabel, nonfuncReqLabel, likeChgLabel, unlikeChgLabel, traceMatricesLabel, + valsOfAuxConsLabel, referenceLabel, appendixLabel, offShelfSolnsLabel, indPRCaseLabel, + projScopeLabel, useCaseTableLabel, terminologyLabel] --FIXME: create using section information somehow? ---TODO: Once shortname can take a Sentence, use NamedIdeas for the second argument in all labels -- | Makes a 'Reference' to a 'Section'. -physSystLabel, datConLabel, genDefnLabel, thModelLabel, dataDefnLabel, - inModelLabel, likeChgLabel, tOfContLabel, tOfSymbLabel, tOfUnitLabel, valsOfAuxConsLabel, - referenceLabel, indPRCaseLabel, unlikeChgLabel, assumptLabel, funcReqLabel, nonfuncReqLabel, - solCharSpecLabel, introLabel, docPurposeLabel, reqsScopeLabel, readerCharsLabel, - docOrgLabel, stakeholderLabel, customerLabel, clientLabel, genSysDescLabel, - sysContextLabel, userCharsLabel, sysConstraintsLabel, projScopeLabel, useCaseTableLabel, - specSystDescLabel, probDescLabel, termDefsLabel, terminologyLabel, goalStmtLabel, - corSolPropsLabel, requirementsLabel, traceMatricesLabel, - appendixLabel, offShelfSolnsLabel, refMatLabel, tOfAbbAccLabel :: Reference +tOfContLabel, refMatLabel, tOfUnitLabel, tOfSymbLabel, tOfAbbAccLabel, + introLabel, docPurposeLabel, reqsScopeLabel, readerCharsLabel, docOrgLabel, + stakeholderLabel, clientLabel, customerLabel, genSysDescLabel, sysContextLabel, + userCharsLabel, sysConstraintsLabel, specSystDescLabel, physSystLabel, probDescLabel, + termDefsLabel, goalStmtLabel, solCharSpecLabel, assumptLabel, thModelLabel, + genDefnLabel, dataDefnLabel, inModelLabel, datConLabel, corSolPropsLabel, requirementsLabel, + funcReqLabel, nonfuncReqLabel, likeChgLabel, unlikeChgLabel, traceMatricesLabel, + valsOfAuxConsLabel, referenceLabel, appendixLabel, offShelfSolnsLabel, indPRCaseLabel, + projScopeLabel, useCaseTableLabel, terminologyLabel :: Reference -physSystLabel = makeSecRef "PhysSyst" $ titleize Doc.physSyst -datConLabel = makeSecRef "DataConstraints" $ titleize' Doc.datumConstraint -genDefnLabel = makeSecRef "GDs" $ titleize' Doc.genDefn -thModelLabel = makeSecRef "TMs" $ titleize' Doc.thModel -dataDefnLabel = makeSecRef "DDs" $ titleize' Doc.dataDefn -inModelLabel = makeSecRef "IMs" $ titleize' Doc.inModel -likeChgLabel = makeSecRef "LCs" $ titleize' Doc.likelyChg -unlikeChgLabel = makeSecRef "UCs" $ titleize' Doc.unlikelyChg tOfContLabel = makeSecRef "ToC" $ titleize' Doc.tOfCont -tOfSymbLabel = makeSecRef "ToS" $ titleize' Doc.tOfSymb + +refMatLabel = makeSecRef "RefMat" $ titleize Doc.refMat tOfUnitLabel = makeSecRef "ToU" $ titleize' Doc.tOfUnit -tOfAbbAccLabel = makeSecRef "AbbandAcc" $ titleize' Doc.abbAcc -valsOfAuxConsLabel = makeSecRef "AuxConstants" $ titleize Doc.consVals -- "Values of Auxiliary Constants" - DO NOT CHANGE OR THINGS WILL BREAK -- see Language.Drasil.Document.Extract -referenceLabel = makeSecRef "References" $ titleize' Doc.reference -indPRCaseLabel = makeSecRef "IndividualProdUC" $ titleize' Doc.indPRCase -assumptLabel = makeSecRef "Assumps" $ titleize' Doc.assumption -funcReqLabel = makeSecRef "FRs" $ titleize' Doc.functionalRequirement -nonfuncReqLabel = makeSecRef "NFRs" $ titleize' Doc.nonfunctionalRequirement -solCharSpecLabel = makeSecRef "SolCharSpec" $ titleize Doc.solutionCharSpec +tOfSymbLabel = makeSecRef "ToS" $ titleize' Doc.tOfSymb +tOfAbbAccLabel = makeSecRef "TAbbAcc" $ titleize' Doc.abbAcc + introLabel = makeSecRef "Intro" $ titleize Doc.introduction docPurposeLabel = makeSecRef "DocPurpose" $ titleize Doc.prpsOfDoc reqsScopeLabel = makeSecRef "ReqsScope" $ titleize' Doc.scpOfReq readerCharsLabel = makeSecRef "ReaderChars" $ titleize' Doc.charOfIR docOrgLabel = makeSecRef "DocOrg" $ titleize Doc.orgOfDoc + stakeholderLabel = makeSecRef "Stakeholder" $ titleize' Doc.stakeholder -customerLabel = makeSecRef "Customer" $ titleizeNP $ the Doc.customer clientLabel = makeSecRef "Client" $ titleizeNP $ the Doc.client +customerLabel = makeSecRef "Customer" $ titleizeNP $ the Doc.customer + genSysDescLabel = makeSecRef "GenSysDesc" $ titleize Doc.generalSystemDescription sysContextLabel = makeSecRef "SysContext" $ titleize Doc.sysCont userCharsLabel = makeSecRef "UserChars" $ titleize' Doc.userCharacteristic sysConstraintsLabel = makeSecRef "SysConstraints" $ titleize' Doc.systemConstraint -projScopeLabel = makeSecRef "ProjScope" $ atStart $ Doc.scpOfTheProj titleize -useCaseTableLabel = makeSecRef "UseCaseTable" $ titleize Doc.prodUCTable + specSystDescLabel = makeSecRef "SpecSystDesc" $ titleize Doc.specificsystemdescription +physSystLabel = makeSecRef "PhysSyst" $ titleize Doc.physSyst probDescLabel = makeSecRef "ProbDesc" $ titleize Doc.problemDescription termDefsLabel = makeSecRef "TermDefs" $ titleize' Doc.termAndDef -terminologyLabel = makeSecRef "Terminology" $ titleize Doc.terminology goalStmtLabel = makeSecRef "GoalStmt" $ titleize' Doc.goalStmt + +solCharSpecLabel = makeSecRef "SolCharSpec" $ titleize Doc.solutionCharSpec +assumptLabel = makeSecRef "Assumps" $ titleize' Doc.assumption +thModelLabel = makeSecRef "TMs" $ titleize' Doc.thModel +genDefnLabel = makeSecRef "GDs" $ titleize' Doc.genDefn +dataDefnLabel = makeSecRef "DDs" $ titleize' Doc.dataDefn +inModelLabel = makeSecRef "IMs" $ titleize' Doc.inModel +datConLabel = makeSecRef "DataConstraints" $ titleize' Doc.datumConstraint corSolPropsLabel = makeSecRef "CorSolProps" $ titleize' Doc.propOfCorSol + requirementsLabel = makeSecRef "Requirements" $ titleize' Doc.requirement +funcReqLabel = makeSecRef "FRs" $ titleize' Doc.functionalRequirement +nonfuncReqLabel = makeSecRef "NFRs" $ titleize' Doc.nonfunctionalRequirement + +likeChgLabel = makeSecRef "LCs" $ titleize' Doc.likelyChg +unlikeChgLabel = makeSecRef "UCs" $ titleize' Doc.unlikelyChg + traceMatricesLabel = makeSecRef "TraceMatrices" $ titleize' Doc.traceyMandG +valsOfAuxConsLabel = makeSecRef "AuxConstants" $ titleize Doc.consVals +referenceLabel = makeSecRef "References" $ titleize' Doc.reference appendixLabel = makeSecRef "Appendix" $ titleize Doc.appendix offShelfSolnsLabel = makeSecRef "offShelfSolns" $ titleize' Doc.offShelfSolution -refMatLabel = makeSecRef "RefMat" $ titleize Doc.refmat \ No newline at end of file + +-- Used only under People/Dan/Presentations/CommitteeMeeting4/BodyNew.hs +indPRCaseLabel = makeSecRef "IndividualProdUC" $ titleize' Doc.indPRCase +-- Seem to be unused. Should they be deleted? +projScopeLabel = makeSecRef "ProjScope" $ atStart $ Doc.scpOfTheProj titleize +useCaseTableLabel = makeSecRef "UseCaseTable" $ titleize Doc.prodUCTable +terminologyLabel = makeSecRef "Terminology" $ titleize Doc.terminology \ No newline at end of file diff --git a/code/drasil-docLang/Drasil/DocumentLanguage.hs b/code/drasil-docLang/Drasil/DocumentLanguage.hs index 197bbda54b..aa99927722 100644 --- a/code/drasil-docLang/Drasil/DocumentLanguage.hs +++ b/code/drasil-docLang/Drasil/DocumentLanguage.hs @@ -1,3 +1,4 @@ +{-# Language TupleSections #-} --------------------------------------------------------------------------- -- | Start the process of moving away from Document as the main internal -- representation of information, to something more informative. @@ -28,13 +29,14 @@ import Database.Drasil(ChunkDB, SystemInformation(SI), _authors, _kind, _quants, _sys, _sysinfodb, _usedinfodb, ccss, ccss', citeDB, collectUnits, conceptinsTable, generateRefbyMap, idMap, refbyTable, termTable, traceTable) -import Drasil.Sections.TableOfAbbAndAcronyms (tableOfAbbAndAcronyms) +import Drasil.Sections.TableOfAbbAndAcronyms (tableAbbAccGen) import Drasil.Sections.TableOfContents (toToC) import Drasil.Sections.TableOfSymbols (table, symbTableRef) import Drasil.Sections.TableOfUnits (tOfUnitDesc, tOfUnitSIName, unitTableRef) import qualified Drasil.DocLang.SRS as SRS (appendix, dataDefn, genDefn, genSysDes, inModel, likeChg, unlikeChg, probDesc, reference, solCharSpec, - stakeholder, thModel, tOfCont, tOfSymb, tOfUnit, userChar, offShelfSol) + stakeholder, thModel, tOfCont, tOfSymb, tOfUnit, userChar, offShelfSol, refMat, + tOfAbbAcc) import qualified Drasil.Sections.AuxiliaryConstants as AC (valsOfAuxConstantsF) import qualified Drasil.Sections.GeneralSystDesc as GSD (genSysIntro, systCon, usrCharsF, sysContxt) @@ -49,7 +51,7 @@ import qualified Drasil.Sections.Stakeholders as Stk (stakeholderIntro, import qualified Drasil.DocumentLanguage.TraceabilityMatrix as TM (traceMGF, generateTraceTableView) -import qualified Data.Drasil.Concepts.Documentation as Doc (likelyChg, refmat, section_, +import qualified Data.Drasil.Concepts.Documentation as Doc (likelyChg, section_, software, unlikelyChg) @@ -102,8 +104,6 @@ extractUnits dd cdb = collectUnits cdb $ ccss' (getDocDesc dd) (egetDocDesc dd) ----- Section creators ----- ---- General Section creator --- - -- | Helper for creating the different document sections. mkSections :: SystemInformation -> DocDesc -> [Section] mkSections si dd = map doit dd @@ -124,17 +124,16 @@ mkSections si dd = map doit dd doit (AppndxSec a) = mkAppndxSec a doit (OffShelfSolnsSec o) = mkOffShelfSolnSec o ---- Table of Contents --- - -- | Helper for making the Table of Contents section. mkToC :: DocDesc -> Section -mkToC dd = SRS.tOfCont [intro, UlC $ ulcc $ Enumeration $ Bullet $ map (, Nothing) $ concatMap toToC dd] [] +mkToC dd = SRS.tOfCont [intro, UlC $ ulcc $ Enumeration $ Bullet $ map ((, Nothing) . toToC) dd] [] where intro = mkParagraph $ S "An outline of all sections included in this SRS is recorded here for easy reference." ---- Reference Materials section. Includes Table of Symbols, Units and Abbreviations and Acronyms. --- + -- | Helper for creating the reference section and subsections. +-- Includes Table of Symbols, Units and Abbreviations and Acronyms. mkRefSec :: SystemInformation -> DocDesc -> RefSec -> Section mkRefSec si dd (RefProg c l) = SRS.refMat [c] (map (mkSubRef si) l) where @@ -159,7 +158,7 @@ mkRefSec si dd (RefProg c l) = SRS.refMat [c] (map (mkSubRef si) l) mkSubRef SI {_sysinfodb = cdb} (TSymb' f con) = mkTSymb (ccss (getDocDesc dd) (egetDocDesc dd) cdb) f con mkSubRef SI {_usedinfodb = db} TAandA = - tOfAbbAcc [LlC $ table $ nub $ map fst $ Map.elems $ termTable db] [] + SRS.tOfAbbAcc [LlC $ tableAbbAccGen $ nub $ map fst $ Map.elems $ termTable db] [] -- | Table of units constructors. tunit, tunit' :: [TUIntro] -> RefTab @@ -355,16 +354,16 @@ mkReqrmntSec (ReqsProg l) = R.reqF $ map mkSubs l -- | Helper for making the Likely Changes section. mkLCsSec :: LCsSec -> Section mkLCsSec (LCsProg c) = SRS.likeChg (intro : mkEnumSimpleD c) [] - where intro = foldlSP [S "This", phrase section_, S "lists the", - plural likelyChg, S "to be made to the", phrase software] + where intro = foldlSP [S "This", phrase Doc.section_, S "lists the", + plural Doc.likelyChg, S "to be made to the", phrase Doc.software] {--} -- | Helper for making the Unikely Changes section. mkUCsSec :: UCsSec -> Section mkUCsSec (UCsProg c) = SRS.unlikeChg (intro : mkEnumSimpleD c) [] - where intro = foldlSP [S "This", phrase section_, S "lists the", - plural unlikelyChg, S "to be made to the", phrase software] + where intro = foldlSP [S "This", phrase Doc.section_, S "lists the", + plural Doc.unlikelyChg, S "to be made to the", phrase Doc.software] {--} @@ -402,6 +401,6 @@ mkAppndxSec (AppndxProg cs) = SRS.appendix cs [] {--} --- | Helper to get part of the system information as an 'IdeaDict'. +-- | Helper to get the program name as an 'IdeaDict'. siSys :: SystemInformation -> IdeaDict siSys SI {_sys = sys} = nw sys diff --git a/code/drasil-docLang/Drasil/Sections/TableOfAbbAndAcronyms.hs b/code/drasil-docLang/Drasil/Sections/TableOfAbbAndAcronyms.hs index 7eba1bca43..a3eaf0ed86 100644 --- a/code/drasil-docLang/Drasil/Sections/TableOfAbbAndAcronyms.hs +++ b/code/drasil-docLang/Drasil/Sections/TableOfAbbAndAcronyms.hs @@ -1,6 +1,6 @@ -- | Standard code to make a table of symbols. module Drasil.Sections.TableOfAbbAndAcronyms - (tableOfAbbAndAcronyms, tableAbbAccRef, tableAbbAccLabel) where + (tableAbbAccGen, tableAbbAccRef) where import Language.Drasil import Data.Drasil.Concepts.Documentation (abbreviation, fullForm, abbAcc) @@ -17,14 +17,14 @@ select (x:xs) = case getA x of Just y -> (y, x) : select xs -- | The actual table creation function. -table :: (Idea s) => [s] -> LabelledContent -table ls = let chunks = sortBy (compare `on` fst) $ select ls in +tableAbbAccGen :: (Idea s) => [s] -> LabelledContent +tableAbbAccGen ls = let chunks = sortBy (compare `on` fst) $ select ls in llcc tableAbbAccRef $ Table (map titleize [abbreviation, fullForm]) (mkTable [\(a,_) -> S a, \(_,b) -> titleize b] chunks) - (titleize abbAcc) True + (titleize' abbAcc) True -- | Table of abbreviations and acronyms reference. tableAbbAccRef :: Reference diff --git a/code/drasil-docLang/Drasil/Sections/TableOfContents.hs b/code/drasil-docLang/Drasil/Sections/TableOfContents.hs index 4b456b85ac..5b7738cc4a 100644 --- a/code/drasil-docLang/Drasil/Sections/TableOfContents.hs +++ b/code/drasil-docLang/Drasil/Sections/TableOfContents.hs @@ -1,58 +1,54 @@ +{-# Language TupleSections #-} -- Standard code to make a table of contents. module Drasil.Sections.TableOfContents (toToC) where - {-(contToCRef, contRefMatRef, contToURef, - contToSRef, contToAARef, contIntroRef, contPoDRef, contSoRRef, contCIRRef, - contOoDRef, contStkhldrRef, contClntRef, contCstmrRef, contGSDRef, - contSysCtxtRef, contUsrChrRef, contSysConRef, contSSDRef, contPrbDescRef, - contSCSRef, contTaDRef, contPSDRef, contGlStRef, contAsmpRef, contTMRef, - contGDRef, contDDRef, contIMRef, contDtCnstrRef, contCSPRef, contRqmtRef, - contFReqsRef, contNFReqsRef, contLCsRef, contUCsRef, contTMaGRef, contVACRef, - contBibRef, contApndxRef, contOtSSRef)-} import Language.Drasil import Drasil.DocumentLanguage.Core +import Utils.Drasil.Concepts import qualified Drasil.DocLang.SRS as SRS -import qualified Drasil.Data.Concepts.Documentation as Doc -{- Which parts of the SRS do we have sections for? -Table of Contents ^ -Reference Material ---- - Table of Units ^ - Table of Symbols ^ - Table of Abbreviations and Acronyms ---- -Instroduction ^ - Purpose of Document ^ - Scope of Requirements ^ - Characteristics of Intended Reader ^ - Organization of Document ^ -Stakeholders ^ - The Client ^ - The Customer ^ -General System Description ^ - System Context ^ - User Characteristics ^ - System Constraints ^ -Specific System Description ^ - Problem Description ^ - -- MISSING: Termonology and definitions ^ - Physical System Description ^ - Goal Statements ^ - Solution Characteristics Specification ^ - Assumptions ^ - Theoretical Models ^ - General Definitions ^ - Data Definitions ^ - Instance Models ^ - Data Constraints ^ - Properties of a Correct Solution ^ -Requirements ^ - Functional Requirements ^ - Non-Functional Requirements ^ -Likely Changes ^ -Unlikely Changes ^ -Traceability Matrices and Graphs ^ -Values of Auxiliary Constants ^ -References ^ -Appendix ^ +import qualified Data.Drasil.Concepts.Documentation as Doc +import qualified Data.Drasil.TheoryConcepts as Doc (dataDefn, genDefn, inModel, thModel) + +{- Layout for Table of Contents +Table of Contents +Reference Material + Table of Units + Table of Symbols + Table of Abbreviations and Acronyms +Instroduction + Purpose of Document + Scope of Requirements + Characteristics of Intended Reader + Organization of Document +Stakeholders + The Client + The Customer +General System Description + System Context + User Characteristics + System Constraints +Specific System Description + Problem Description + Termonology and definitions + Physical System Description + Goal Statements + Solution Characteristics Specification + Assumptions + Theoretical Models + General Definitions + Data Definitions + Instance Models + Data Constraints + Properties of a Correct Solution +Requirements + Functional Requirements + Non-Functional Requirements +Likely Changes +Unlikely Changes +Traceability Matrices and Graphs +Values of Auxiliary Constants +References +Appendix Other refs not used but still defined: product use case @@ -60,26 +56,29 @@ scope of the project use case table off the shelf solutions -} --- Finds all possible sections and subsections. Then places them in a list format. --- remove list from type? -toToC :: DocSection -> [ItemType] -toToC TableOfContents = [mktToCSec] -toToC (RefSec rs) = [mktRefSec rs] -toToC (IntroSec is) = [mktIntroSec is] -toToC (StkhldrSec sts) = [mktStkhldrSec sts] -toToC (GSDSec gs') = [mktGSDSec gs'] -toToC (SSDSec ss) = [mktSSDSec ss] -toToC (ReqrmntSec r) = [mktReqrmntSec r] -toToC (LCsSec lc) = [mktLCsSec lc] -toToC (UCsSec ulcs) = [mktUCsSec ulcs] -toToC (TraceabilitySec t) = [mktTraceabilitySec t] -toToC (AuxConstntSec acs) = [mktAuxConsSec acs] -toToC Bibliography = [mktBib] -toToC (AppndxSec a) = [mktAppndxSec a] -toToC (OffShelfSolnsSec o) = [mktOffShelfSolnSec o] + +-- TODO: Use DLPlate for this. +-- | Finds all possible sections and subsections to make a Table of Contents. +toToC :: DocSection -> ItemType +toToC TableOfContents = mktToCSec +toToC (RefSec rs) = mktRefSec rs +toToC (IntroSec i) = mktIntroSec i +toToC (StkhldrSec sts) = mktStkhldrSec sts +toToC (GSDSec gs') = mktGSDSec gs' +toToC (SSDSec ss) = mktSSDSec ss +toToC (ReqrmntSec r) = mktReqrmntSec r +toToC (LCsSec lc) = mktLCsSec lc +toToC (UCsSec ulcs) = mktUCsSec ulcs +toToC (TraceabilitySec t) = mktTraceabilitySec t +toToC (AuxConstntSec acs) = mktAuxConsSec acs +toToC Bibliography = mktBib +toToC (AppndxSec a) = mktAppndxSec a +toToC (OffShelfSolnsSec o) = mktOffShelfSolnSec o mkHeaderItem :: Sentence -> [Sentence] -> ItemType mkHeaderItem hdr itm = Nested hdr $ Bullet $ map (\x -> (Flat x, Nothing)) itm +mkHeaderItem' :: Sentence -> [ItemType] -> ItemType +mkHeaderItem' hdr itm = Nested hdr $ Bullet $ map (, Nothing) itm -- | Helper for creating the 'Table of Contents' section ToC entry mktToCSec :: ItemType @@ -88,7 +87,7 @@ mktToCSec = Flat $ namedRef SRS.tOfContLabel $ titleize' Doc.tOfCont -- | Helper for creating the 'Reference Material' section ToC entry mktRefSec :: RefSec -> ItemType mktRefSec (RefProg _ l) = - mkHeaderItem (namedRef SRS.refMatLabel $ titleize Doc.refmat) $ map mktSubRef l + mkHeaderItem (namedRef SRS.refMatLabel $ titleize Doc.refMat) $ map mktSubRef l where mktSubRef :: RefTab -> Sentence mktSubRef TUnits = namedRef SRS.tOfUnitLabel $ titleize' Doc.tOfUnit @@ -130,203 +129,60 @@ mktGSDSec (GSDProg l) = -- | Helper for creating the 'Specific System Description' section ToC entry mktSSDSec :: SSDSec -> ItemType mktSSDSec (SSDProg l) = - mkHeaderItem (namedRef SRS.specSystDescLabel $ titleize Doc.specificsystemdescription) map mktSubSSD l + mkHeaderItem' (namedRef SRS.specSystDescLabel $ titleize Doc.specificsystemdescription) $ map mktSubSSD l where mktSubSSD :: SSDSub -> ItemType - mktSubSSD (SSDProblem (PDProg _ _ sl1)) = Nested (Ref contPrbDescRef) (Bullet (map mktSubPD sl1)) - mktSubSSD (SSDSolChSpec (SCSProg sl2)) = Nested (Ref contSCSRef) (Bullet (map mktSubSCS sl2)) - - mktSubPD :: PDSub -> (ItemType,Maybe String) - mktSubPD (TermsAndDefs _ _) = (Flat (Ref contTaDRef),Nothing) - mktSubPD PhySysDesc {} = (Flat (Ref contPSDRef),Nothing) - mktSubPD (Goals _ _) = (Flat (Ref contGlStRef),Nothing) - - mktSubSCS :: SCSSub -> (ItemType,Maybe String) - mktSubSCS (Assumptions _) = (Flat (Ref contAsmpRef),Nothing) - mktSubSCS TMs {} = (Flat (Ref contTMRef),Nothing) - mktSubSCS GDs {} = (Flat (Ref contGDRef),Nothing) - mktSubSCS DDs {} = (Flat (Ref contDDRef),Nothing) - mktSubSCS IMs {} = (Flat (Ref contIMRef),Nothing) - mktSubSCS (Constraints _ _) = (Flat (Ref contDtCnstrRef),Nothing) - mktSubSCS (CorrSolnPpties _ _) = (Flat (Ref contCSPRef),Nothing) + mktSubSSD (SSDProblem (PDProg _ _ sl1)) = mkHeaderItem (namedRef SRS.probDescLabel $ titleize Doc.problemDescription) $ map mktSubPD sl1 + mktSubSSD (SSDSolChSpec (SCSProg sl2)) = mkHeaderItem (namedRef SRS.solCharSpecLabel $ titleize Doc.solutionCharSpec) $ map mktSubSCS sl2 + + mktSubPD :: PDSub -> Sentence + mktSubPD (TermsAndDefs _ _) = namedRef SRS.termDefsLabel $ titleize' Doc.termAndDef + mktSubPD PhySysDesc {} = namedRef SRS.physSystLabel $ titleize Doc.physSyst + mktSubPD (Goals _ _) = namedRef SRS.goalStmtLabel $ titleize' Doc.goalStmt + + mktSubSCS :: SCSSub -> Sentence + mktSubSCS (Assumptions _) = namedRef SRS.assumptLabel $ titleize' Doc.assumption + mktSubSCS TMs {} = namedRef SRS.thModelLabel $ titleize' Doc.thModel + mktSubSCS GDs {} = namedRef SRS.genDefnLabel $ titleize' Doc.genDefn + mktSubSCS DDs {} = namedRef SRS.dataDefnLabel $ titleize' Doc.dataDefn + mktSubSCS IMs {} = namedRef SRS.inModelLabel $ titleize' Doc.inModel + mktSubSCS (Constraints _ _) = namedRef SRS.datConLabel $ titleize' Doc.datumConstraint + mktSubSCS (CorrSolnPpties _ _) = namedRef SRS.corSolPropsLabel $ titleize' Doc.propOfCorSol -- | Helper for creating the 'Requirements' section ToC entry -mktReqrmntSec :: ReqrmntSec -> [(ItemType,Maybe String)] +mktReqrmntSec :: ReqrmntSec -> ItemType mktReqrmntSec (ReqsProg l) = - mkTEList [(Ref contRqmtRef,map mktSubs l)] + mkHeaderItem (namedRef SRS.requirementsLabel $ titleize' Doc.requirement) $ map mktSubs l where mktSubs :: ReqsSub -> Sentence - mktSubs (FReqsSub' _ _) = Ref contFReqsRef - mktSubs (FReqsSub _ _) = Ref contFReqsRef - mktSubs (NonFReqsSub _) = Ref contNFReqsRef + mktSubs (FReqsSub' _ _) = namedRef SRS.funcReqLabel $ titleize' Doc.functionalRequirement + mktSubs (FReqsSub _ _) = namedRef SRS.funcReqLabel $ titleize' Doc.functionalRequirement + mktSubs (NonFReqsSub _) = namedRef SRS.nonfuncReqLabel $ titleize' Doc.nonfunctionalRequirement -- | Helper for creating the 'Likely Changes' section ToC entry -mktLCsSec :: LCsSec -> [(ItemType,Maybe String)] -mktLCsSec (LCsProg _) = [(Flat (Ref contLCsRef),Nothing)] +mktLCsSec :: LCsSec -> ItemType +mktLCsSec (LCsProg _) = Flat $ namedRef SRS.likeChgLabel $ titleize' Doc.likelyChg -- | Helper for creating the 'Unlikely Changes' section ToC entry -mktUCsSec :: UCsSec -> [(ItemType,Maybe String)] -mktUCsSec (UCsProg _) = [(Flat (Ref contUCsRef),Nothing)] +mktUCsSec :: UCsSec -> ItemType +mktUCsSec (UCsProg _) = Flat $ namedRef SRS.unlikeChgLabel $ titleize' Doc.unlikelyChg -- | Helper for creating the 'Traceability Matrices and Graphs' section ToC entry -mktTraceabilitySec :: TraceabilitySec -> [(ItemType,Maybe String)] -mktTraceabilitySec (TraceabilityProg _) = [(Flat (Ref contTMaGRef),Nothing)] +mktTraceabilitySec :: TraceabilitySec -> ItemType +mktTraceabilitySec (TraceabilityProg _) = Flat $ namedRef SRS.traceMatricesLabel $ titleize' Doc.traceyMandG -- | Helper for creating the 'Values of Auxiliary Constants' section ToC entry -mktAuxConsSec :: AuxConstntSec -> [(ItemType,Maybe String)] -mktAuxConsSec (AuxConsProg _ _) = [(Flat (Ref contVACRef),Nothing)] +mktAuxConsSec :: AuxConstntSec -> ItemType +mktAuxConsSec (AuxConsProg _ _) = Flat $ namedRef SRS.valsOfAuxConsLabel $ titleize Doc.consVals -- | Helper for creating the 'References' section ToC entry -mktBib :: [(ItemType,Maybe String)] -mktBib = [(Flat (Ref contBibRef),Nothing)] +mktBib :: ItemType +mktBib = Flat $ namedRef SRS.referenceLabel $ titleize' Doc.reference -- | Helper for creating the 'Appendix' section ToC entry -mktAppndxSec :: AppndxSec -> [(ItemType,Maybe String)] -mktAppndxSec (AppndxProg _) = [(Flat (Ref contApndxRef),Nothing)] +mktAppndxSec :: AppndxSec -> ItemType +mktAppndxSec (AppndxProg _) = Flat $ namedRef SRS.appendixLabel $ titleize Doc.appendix -- | Helper for creating the 'Off-The-Shelf Solutions' section ToC entry -mktOffShelfSolnSec :: OffShelfSolnsSec -> [(ItemType,Maybe String)] -mktOffShelfSolnSec (OffShelfSolnsProg _) = [(Flat (Ref contOtSSRef),Nothing)] - - - - - - - - - - -{-- Table of Contents section entry -contToCRef :: Reference -contToCRef = makeSecRef "ToC" "Table of Contents" - --- Reference Material section entries -contRefMatRef :: Reference -contRefMatRef = makeSecRef "RefMat" "Reference Material" - -contToURef :: Reference -contToURef = makeSecRef "ToU" "Table of Units" - -contToSRef :: Reference -contToSRef = makeSecRef "ToS" "Table of Symbols" - -contToAARef :: Reference -contToAARef = makeSecRef "TAbbAcc" "Table of Abbreviations and Acronyms" - --- Introduction section entries -contIntroRef :: Reference -contIntroRef = makeSecRef "Intro" "Instroduction" - -contPoDRef :: Reference -contPoDRef = makeSecRef "DocPurpose" "Purpose of Document" - -contSoRRef :: Reference -contSoRRef = makeSecRef "ReqsScope" "Scope of Requirements" - -contCIRRef :: Reference -contCIRRef = makeSecRef "ReaderChars" "Characteristics of Intended Reader" - -contOoDRef :: Reference -contOoDRef = makeSecRef "DocOrg" "Organization of Document" - --- Stakeholders section entries -contStkhldrRef :: Reference -contStkhldrRef = makeSecRef "Stakeholder" "Stakeholders" - -contClntRef :: Reference -contClntRef = makeSecRef "Client" "The Client" - -contCstmrRef :: Reference -contCstmrRef = makeSecRef "Customer" "The Customer" - --- General System Description section entries -contGSDRef :: Reference -contGSDRef = makeSecRef "GenSysDesc" "General System Description" - -contSysCtxtRef :: Reference -contSysCtxtRef = makeSecRef "SysContext" "System Context" - -contUsrChrRef :: Reference -contUsrChrRef = makeSecRef "UserChars" "User Characteristics" - -contSysConRef :: Reference -contSysConRef = makeSecRef "SysConstraints" "System Constraints" - --- Specific System Description section entries -contSSDRef :: Reference -contSSDRef = makeSecRef "SpecSystDesc" "Specific System Description" - -contPrbDescRef :: Reference -contPrbDescRef = makeSecRef "ProbDesc" "Problem Description" - -contSCSRef :: Reference -contSCSRef = makeSecRef "SolCharSpec" "Solution Characteristics Specification" - -contTaDRef :: Reference -contTaDRef = makeSecRef "TermDefs" "Terminology and Definitions" - -contPSDRef :: Reference -contPSDRef = makeSecRef "PhysSyst" "Physical System Description" - -contGlStRef :: Reference -contGlStRef = makeSecRef "GoalStmt" "Goal Statements" - -contAsmpRef :: Reference -contAsmpRef = makeSecRef "Assumps" "Assumptions" - -contTMRef :: Reference -contTMRef = makeSecRef "TMs" "Theoretical Models" - -contGDRef :: Reference -contGDRef = makeSecRef "GDs" "General Definitions" - -contDDRef :: Reference -contDDRef = makeSecRef "DDs" "Data Definitions" - -contIMRef :: Reference -contIMRef = makeSecRef "IMs" "Instance Models" - -contDtCnstrRef :: Reference -contDtCnstrRef = makeSecRef "DataConstraints" "Data Constraints" - -contCSPRef :: Reference -contCSPRef = makeSecRef "CorSolProps" "Properties of a Correct Solution" - --- Requirements section entries -contRqmtRef :: Reference -contRqmtRef = makeSecRef "Requirements" "Requirements" - -contFReqsRef :: Reference -contFReqsRef = makeSecRef "FRs" "Functional Requirements" - -contNFReqsRef :: Reference -contNFReqsRef = makeSecRef "NFRs" "Non-Functional Requirements" - --- Likely Changes section entry -contLCsRef :: Reference -contLCsRef = makeSecRef "LCs" "Likely Changes" - --- Unlikely Changes section entry -contUCsRef :: Reference -contUCsRef = makeSecRef "UCs" "Unlikely Changes" - --- Traceability Matrices and Graphs section entry -contTMaGRef :: Reference -contTMaGRef = makeSecRef "TraceMatrices" "Traceability Matrices and Graphs" - --- Values of Auxiliary Constants section entry -contVACRef :: Reference -contVACRef = makeSecRef "AuxConstants" "Values of Auxiliary Constants" - --- References section entry -contBibRef :: Reference -contBibRef = makeSecRef "References" "References" - --- Appendix section entry -contApndxRef :: Reference -contApndxRef = makeSecRef "Appendix" "Appendix" - --- Off-The-Shelf Solutions section entry -contOtSSRef :: Reference -contOtSSRef = makeSecRef "offShelfSolns" "Off-The-Shelf Solutions"-} \ No newline at end of file +mktOffShelfSolnSec :: OffShelfSolnsSec -> ItemType +mktOffShelfSolnSec (OffShelfSolnsProg _) = Flat $ namedRef SRS.offShelfSolnsLabel $ titleize' Doc.offShelfSolution diff --git a/code/drasil-example/Drasil/HGHC/Body.hs b/code/drasil-example/Drasil/HGHC/Body.hs index 44a59a0d0d..ccfbd48463 100644 --- a/code/drasil-example/Drasil/HGHC/Body.hs +++ b/code/drasil-example/Drasil/HGHC/Body.hs @@ -1,23 +1,13 @@ module Drasil.HGHC.Body (srs, si, symbMap, printSetting, fullSI) where -<<<<<<< HEAD -import Language.Drasil hiding (Manual, Symbol(..)) -- Citation name conflict. FIXME: Move to different namespace -import Drasil.DocLang (DocSection(TableOfContents, RefSec, SSDSec), - Literature(Lit, Manual), RefSec(..), RefTab(TUnits), TSIntro(SymbConvention, - TSPurpose), SRSDecl, intro, mkDoc, tsymb, InclUnits(IncludeUnits), - Verbosity(Verbose), Field(DefiningEquation, Description, Label, Symbol, Units), - SolChSpec(SCSProg), SCSSub(DDs), DerivationDisplay(HideDerivation), - SSDSub(SSDSolChSpec), SSDSec(SSDProg)) -======= import Data.List (nub) import Language.Drasil hiding (Manual) -- Citation name conflict. FIXME: Move to different namespace import Drasil.DocLang (DocSection(RefSec, SSDSec), Literature(Lit, Manual), - RefSec(..), RefTab(TUnits), TSIntro(SymbConvention, TSPurpose), SRSDecl, - intro, mkDoc, tsymb, InclUnits(IncludeUnits), Verbosity(Verbose), + RefSec(..), RefTab(TUnits), DocSection(TableOfContents), TSIntro(SymbConvention, TSPurpose), + SRSDecl, intro, mkDoc, tsymb, InclUnits(IncludeUnits), Verbosity(Verbose), Field(DefiningEquation, Description, Label, Symbol, Units), SolChSpec(SCSProg), SCSSub(DDs), DerivationDisplay(HideDerivation), SSDSub(SSDSolChSpec), SSDSec(SSDProg), traceMatStandard, getTraceConfigUID, secRefs, fillTraceSI) ->>>>>>> master import Language.Drasil.Printers (PrintingInformation(..), defaultConfiguration) import Database.Drasil (Block, ChunkDB, SystemInformation(SI), cdb, rdb, refdb, _authors, _concepts, _constants, _constraints, _purpose, diff --git a/code/drasil-lang/Language/Drasil.hs b/code/drasil-lang/Language/Drasil.hs index 8e3e678a93..77be960870 100644 --- a/code/drasil-lang/Language/Drasil.hs +++ b/code/drasil-lang/Language/Drasil.hs @@ -124,14 +124,14 @@ module Language.Drasil ( , Document(..), DType(..), Section(..), Contents(..) , SecCons(..), ListType(..), ItemType(..), ListTuple , LabelledContent(..), UnlabelledContent(..), extractSection, getDTle, getDAtr - , getDSec, getDDoc, mkParagraph, mkUnOrdList, mkTEList, mkTE2List, mkRawLC + , getDSec, getDDoc, mkParagraph, mkRawLC , llcc, ulcc , section, fig, figWithWidth , MaxWidthPercent , HasContents(accessContents) , RawContent(..) , mkFig - , makeTabRef, makeFigRef, makeSecRef, makeToCRef, makeLstRef, makeURI + , makeTabRef, makeFigRef, makeSecRef, makeLstRef, makeURI -- Space , Space(..) , RealInterval(..), Inclusive(..), RTopology(..) , DomainDesc(AllDD, BoundedDD), getActorName, getInnerSpace @@ -212,8 +212,8 @@ import Language.Drasil.Expr.Math (abs_, neg, negVec, log, ln, sin, cos, tan, sqr import Language.Drasil.Expr.Display import Language.Drasil.Document (section, fig, figWithWidth , Section(..), SecCons(..) , llcc, ulcc, Document(..), getDTle, getDAtr, getDSec - , getDDoc, mkParagraph, mkUnOrdList, mkTEList, mkTE2List, mkFig, mkRawLC - , extractSection, makeTabRef, makeFigRef, makeSecRef, makeToCRef, makeLstRef, makeURI) + , getDDoc, mkParagraph, mkFig, mkRawLC + , extractSection, makeTabRef, makeFigRef, makeSecRef, makeLstRef, makeURI) import Language.Drasil.Document.Core (Contents(..), ListType(..), ItemType(..), DType(..) , RawContent(..), ListTuple, MaxWidthPercent , HasContents(accessContents) diff --git a/code/drasil-lang/Language/Drasil/Document.hs b/code/drasil-lang/Language/Drasil/Document.hs index 1582df769d..5501c0db35 100644 --- a/code/drasil-lang/Language/Drasil/Document.hs +++ b/code/drasil-lang/Language/Drasil/Document.hs @@ -1,4 +1,4 @@ -{-# Language TemplateHaskell, TupleSections #-} +{-# Language TemplateHaskell #-} -- | Document Description Language module Language.Drasil.Document where @@ -75,26 +75,6 @@ ulcc = UnlblC mkParagraph :: Sentence -> Contents mkParagraph x = UlC $ ulcc $ Paragraph x --- Note: are these needed? Check. otherwise move to Utils -mkUnOrdList :: [Sentence] -> Contents -mkUnOrdList l = UlC $ ulcc $ Enumeration $ mkUnOrdList_ l - -mkUnOrdList_ :: [Sentence] -> ListType -mkUnOrdList_ l = Bullet tl where - tl = map (\a -> (Flat a,Nothing)) l - -mkUnOrdList2_ :: [ItemType] -> ListType -mkUnOrdList2_ l = Bullet tl where - tl = map (,Nothing) l - -mkTEList :: [(Sentence,[Sentence])] -> [ItemType] -mkTEList l = tl where - tl = zipWith (\n a -> Nested n a) (map fst l) (map (mkUnOrdList_ . snd) l) - -mkTE2List :: [(Sentence,[ItemType])] -> [ItemType] -mkTE2List l = tl where - tl = zipWith (\n a -> Nested n a) (map fst l) (map (mkUnOrdList2_ . snd) l) - -- | Smart constructor that wraps 'LabelledContent' into 'Contents'. mkFig :: Reference -> RawContent -> Contents mkFig x y = LlC $ llcc x y