{-# Language TupleSections #-}
module Drasil.Sections.TableOfContents (toToC, findToC) where
import Language.Drasil
import Drasil.DocumentLanguage.Core
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Drasil.DocLang.SRS as SRS
import qualified Data.Drasil.Concepts.Documentation as Doc
import Drasil.Metadata (dataDefn, genDefn, inModel, thModel)
toToC :: DocSection -> ItemType
toToC :: DocSection -> ItemType
toToC DocSection
TableOfContents = ItemType
mktToCSec
toToC (RefSec RefSec
rs) = RefSec -> ItemType
mktRefSec RefSec
rs
toToC (IntroSec IntroSec
i) = IntroSec -> ItemType
mktIntroSec IntroSec
i
toToC (StkhldrSec StkhldrSec
sts) = StkhldrSec -> ItemType
mktStkhldrSec StkhldrSec
sts
toToC (GSDSec GSDSec
gs') = GSDSec -> ItemType
mktGSDSec GSDSec
gs'
toToC (SSDSec SSDSec
ss) = SSDSec -> ItemType
mktSSDSec SSDSec
ss
toToC (ReqrmntSec ReqrmntSec
r) = ReqrmntSec -> ItemType
mktReqrmntSec ReqrmntSec
r
toToC (LCsSec LCsSec
lc) = LCsSec -> ItemType
mktLCsSec LCsSec
lc
toToC (UCsSec UCsSec
ulcs) = UCsSec -> ItemType
mktUCsSec UCsSec
ulcs
toToC (TraceabilitySec TraceabilitySec
t) = TraceabilitySec -> ItemType
mktTraceabilitySec TraceabilitySec
t
toToC (AuxConstntSec AuxConstntSec
acs) = AuxConstntSec -> ItemType
mktAuxConsSec AuxConstntSec
acs
toToC DocSection
Bibliography = ItemType
mktBib
toToC (AppndxSec AppndxSec
a) = AppndxSec -> ItemType
mktAppndxSec AppndxSec
a
toToC (OffShelfSolnsSec OffShelfSolnsSec
o) = OffShelfSolnsSec -> ItemType
mktOffShelfSolnSec OffShelfSolnsSec
o
mkHeaderItem :: Sentence -> [Sentence] -> ItemType
Sentence
hdr [Sentence]
itm = Sentence -> ListType -> ItemType
Nested Sentence
hdr (ListType -> ItemType) -> ListType -> ItemType
forall a b. (a -> b) -> a -> b
$ [(ItemType, Maybe String)] -> ListType
Bullet ([(ItemType, Maybe String)] -> ListType)
-> [(ItemType, Maybe String)] -> ListType
forall a b. (a -> b) -> a -> b
$ (Sentence -> (ItemType, Maybe String))
-> [Sentence] -> [(ItemType, Maybe String)]
forall a b. (a -> b) -> [a] -> [b]
map (\Sentence
x -> (Sentence -> ItemType
Flat Sentence
x, Maybe String
forall a. Maybe a
Nothing)) [Sentence]
itm
mkHeaderItem' :: Sentence -> [ItemType] -> ItemType
Sentence
hdr [ItemType]
itm = Sentence -> ListType -> ItemType
Nested Sentence
hdr (ListType -> ItemType) -> ListType -> ItemType
forall a b. (a -> b) -> a -> b
$ [(ItemType, Maybe String)] -> ListType
Bullet ([(ItemType, Maybe String)] -> ListType)
-> [(ItemType, Maybe String)] -> ListType
forall a b. (a -> b) -> a -> b
$ (ItemType -> (ItemType, Maybe String))
-> [ItemType] -> [(ItemType, Maybe String)]
forall a b. (a -> b) -> [a] -> [b]
map (, Maybe String
forall a. Maybe a
Nothing) [ItemType]
itm
mktToCSec :: ItemType
mktToCSec :: ItemType
mktToCSec = Sentence -> ItemType
Flat (Sentence -> ItemType) -> Sentence -> ItemType
forall a b. (a -> b) -> a -> b
$ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.tOfContLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.tOfCont
mktRefSec :: RefSec -> ItemType
mktRefSec :: RefSec -> ItemType
mktRefSec (RefProg Contents
_ [RefTab]
l) =
Sentence -> [Sentence] -> ItemType
mkHeaderItem (Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.refMatLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.refMat) ([Sentence] -> ItemType) -> [Sentence] -> ItemType
forall a b. (a -> b) -> a -> b
$ (RefTab -> Sentence) -> [RefTab] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map RefTab -> Sentence
mktSubRef [RefTab]
l
where
mktSubRef :: RefTab -> Sentence
mktSubRef :: RefTab -> Sentence
mktSubRef RefTab
TUnits = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.tOfUnitLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.tOfUnit
mktSubRef (TUnits' [TUIntro]
_ [UnitDefn] -> LabelledContent
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.tOfUnitLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.tOfUnit
mktSubRef (TSymb [TSIntro]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.tOfSymbLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.tOfSymb
mktSubRef (TSymb' LFunc
_ [TSIntro]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.tOfSymbLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.tOfSymb
mktSubRef (TAandA [IdeaDict]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.tOfAbbAccLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.abbAcc
mktIntroSec :: IntroSec -> ItemType
mktIntroSec :: IntroSec -> ItemType
mktIntroSec (IntroProg Sentence
_ Sentence
_ [IntroSub]
l) =
Sentence -> [Sentence] -> ItemType
mkHeaderItem (Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.introLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.introduction) ([Sentence] -> ItemType) -> [Sentence] -> ItemType
forall a b. (a -> b) -> a -> b
$ (IntroSub -> Sentence) -> [IntroSub] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map IntroSub -> Sentence
mktSubIntro [IntroSub]
l
where
mktSubIntro :: IntroSub -> Sentence
mktSubIntro :: IntroSub -> Sentence
mktSubIntro (IPurpose [Sentence]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.docPurposeLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.prpsOfDoc
mktSubIntro (IScope Sentence
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.reqsScopeLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.scpOfReq
mktSubIntro IChar {} = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.readerCharsLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.charOfIR
mktSubIntro IOrgSec {} = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.docOrgLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.orgOfDoc
mktStkhldrSec:: StkhldrSec -> ItemType
mktStkhldrSec :: StkhldrSec -> ItemType
mktStkhldrSec (StkhldrProg [StkhldrSub]
l) =
Sentence -> [Sentence] -> ItemType
mkHeaderItem (Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.stakeholderLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.stakeholder) ([Sentence] -> ItemType) -> [Sentence] -> ItemType
forall a b. (a -> b) -> a -> b
$ (StkhldrSub -> Sentence) -> [StkhldrSub] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map StkhldrSub -> Sentence
mktSub [StkhldrSub]
l
where
mktSub :: StkhldrSub -> Sentence
mktSub :: StkhldrSub -> Sentence
mktSub (Client CI
_ Sentence
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.customerLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ NP -> Sentence
forall n. NounPhrase n => n -> Sentence
titleizeNP (NP -> Sentence) -> NP -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> NP
forall t. NamedIdea t => t -> NP
the IdeaDict
Doc.customer
mktSub (Cstmr CI
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.clientLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ NP -> Sentence
forall n. NounPhrase n => n -> Sentence
titleizeNP (NP -> Sentence) -> NP -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> NP
forall t. NamedIdea t => t -> NP
the IdeaDict
Doc.client
mktGSDSec :: GSDSec -> ItemType
mktGSDSec :: GSDSec -> ItemType
mktGSDSec (GSDProg [GSDSub]
l) =
Sentence -> [Sentence] -> ItemType
mkHeaderItem (Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.genSysDescLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.generalSystemDescription) ([Sentence] -> ItemType) -> [Sentence] -> ItemType
forall a b. (a -> b) -> a -> b
$ (GSDSub -> Sentence) -> [GSDSub] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map GSDSub -> Sentence
mktSub [GSDSub]
l
where
mktSub :: GSDSub -> Sentence
mktSub :: GSDSub -> Sentence
mktSub (SysCntxt [Contents]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.sysContextLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.sysCont
mktSub (UsrChars [Contents]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.userCharsLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.userCharacteristic
mktSub (SystCons [Contents]
_ [Section]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.sysConstraintsLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.systemConstraint
mktSSDSec :: SSDSec -> ItemType
mktSSDSec :: SSDSec -> ItemType
mktSSDSec (SSDProg [SSDSub]
l) =
Sentence -> [ItemType] -> ItemType
mkHeaderItem' (Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.specSystDescLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.specificsystemdescription) ([ItemType] -> ItemType) -> [ItemType] -> ItemType
forall a b. (a -> b) -> a -> b
$ (SSDSub -> ItemType) -> [SSDSub] -> [ItemType]
forall a b. (a -> b) -> [a] -> [b]
map SSDSub -> ItemType
mktSubSSD [SSDSub]
l
where
mktSubSSD :: SSDSub -> ItemType
mktSubSSD :: SSDSub -> ItemType
mktSubSSD (SSDProblem (PDProg Sentence
_ [Section]
_ [PDSub]
sl1)) = Sentence -> [Sentence] -> ItemType
mkHeaderItem (Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.probDescLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.problemDescription) ([Sentence] -> ItemType) -> [Sentence] -> ItemType
forall a b. (a -> b) -> a -> b
$ (PDSub -> Sentence) -> [PDSub] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map PDSub -> Sentence
mktSubPD [PDSub]
sl1
mktSubSSD (SSDSolChSpec (SCSProg [SCSSub]
sl2)) = Sentence -> [Sentence] -> ItemType
mkHeaderItem (Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.solCharSpecLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.solutionCharSpec) ([Sentence] -> ItemType) -> [Sentence] -> ItemType
forall a b. (a -> b) -> a -> b
$ (SCSSub -> Sentence) -> [SCSSub] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map SCSSub -> Sentence
mktSubSCS [SCSSub]
sl2
mktSubPD :: PDSub -> Sentence
mktSubPD :: PDSub -> Sentence
mktSubPD (TermsAndDefs Maybe Sentence
_ [c]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.termDefsLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.termAndDef
mktSubPD PhySysDesc {} = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.physSystLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize CI
Doc.physSyst
mktSubPD (Goals [Sentence]
_ [ConceptInstance]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.goalStmtLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' CI
Doc.goalStmt
mktSubSCS :: SCSSub -> Sentence
mktSubSCS :: SCSSub -> Sentence
mktSubSCS (Assumptions [ConceptInstance]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.assumptLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' CI
Doc.assumption
mktSubSCS TMs {} = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.thModelLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' CI
thModel
mktSubSCS GDs {} = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.genDefnLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' CI
genDefn
mktSubSCS DDs {} = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.dataDefnLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' CI
dataDefn
mktSubSCS IMs {} = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.inModelLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' CI
inModel
mktSubSCS (Constraints Sentence
_ [c]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.datConLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.datumConstraint
mktSubSCS (CorrSolnPpties [c]
_ [Contents]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.corSolPropsLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.propOfCorSol
mktReqrmntSec :: ReqrmntSec -> ItemType
mktReqrmntSec :: ReqrmntSec -> ItemType
mktReqrmntSec (ReqsProg [ReqsSub]
l) =
Sentence -> [Sentence] -> ItemType
mkHeaderItem (Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.requirementsLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' CI
Doc.requirement) ([Sentence] -> ItemType) -> [Sentence] -> ItemType
forall a b. (a -> b) -> a -> b
$ (ReqsSub -> Sentence) -> [ReqsSub] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map ReqsSub -> Sentence
mktSubs [ReqsSub]
l
where
mktSubs :: ReqsSub -> Sentence
mktSubs :: ReqsSub -> Sentence
mktSubs (FReqsSub' [ConceptInstance]
_ [LabelledContent]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.funcReqLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.functionalRequirement
mktSubs (FReqsSub [ConceptInstance]
_ [LabelledContent]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.funcReqLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.functionalRequirement
mktSubs (NonFReqsSub [ConceptInstance]
_) = Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.nonfuncReqLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.nonfunctionalRequirement
mktLCsSec :: LCsSec -> ItemType
mktLCsSec :: LCsSec -> ItemType
mktLCsSec (LCsProg [ConceptInstance]
_) = Sentence -> ItemType
Flat (Sentence -> ItemType) -> Sentence -> ItemType
forall a b. (a -> b) -> a -> b
$ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.likeChgLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' CI
Doc.likelyChg
mktUCsSec :: UCsSec -> ItemType
mktUCsSec :: UCsSec -> ItemType
mktUCsSec (UCsProg [ConceptInstance]
_) = Sentence -> ItemType
Flat (Sentence -> ItemType) -> Sentence -> ItemType
forall a b. (a -> b) -> a -> b
$ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.unlikeChgLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ CI -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' CI
Doc.unlikelyChg
mktTraceabilitySec :: TraceabilitySec -> ItemType
mktTraceabilitySec :: TraceabilitySec -> ItemType
mktTraceabilitySec (TraceabilityProg [TraceConfig]
_) = Sentence -> ItemType
Flat (Sentence -> ItemType) -> Sentence -> ItemType
forall a b. (a -> b) -> a -> b
$ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.traceMatricesLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.traceyMandG
mktAuxConsSec :: AuxConstntSec -> ItemType
mktAuxConsSec :: AuxConstntSec -> ItemType
mktAuxConsSec (AuxConsProg CI
_ [ConstQDef]
_) = Sentence -> ItemType
Flat (Sentence -> ItemType) -> Sentence -> ItemType
forall a b. (a -> b) -> a -> b
$ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.valsOfAuxConsLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.consVals
mktBib :: ItemType
mktBib :: ItemType
mktBib = Sentence -> ItemType
Flat (Sentence -> ItemType) -> Sentence -> ItemType
forall a b. (a -> b) -> a -> b
$ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.referenceLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.reference
mktAppndxSec :: AppndxSec -> ItemType
mktAppndxSec :: AppndxSec -> ItemType
mktAppndxSec (AppndxProg [Contents]
_) = Sentence -> ItemType
Flat (Sentence -> ItemType) -> Sentence -> ItemType
forall a b. (a -> b) -> a -> b
$ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.appendixLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.appendix
mktOffShelfSolnSec :: OffShelfSolnsSec -> ItemType
mktOffShelfSolnSec :: OffShelfSolnsSec -> ItemType
mktOffShelfSolnSec (OffShelfSolnsProg [Contents]
_) = Sentence -> ItemType
Flat (Sentence -> ItemType) -> Sentence -> ItemType
forall a b. (a -> b) -> a -> b
$ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
SRS.offShelfSolnsLabel (Sentence -> Sentence) -> Sentence -> Sentence
forall a b. (a -> b) -> a -> b
$ IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.offShelfSolution
findToC :: [DocSection] -> ShowTableOfContents
findToC :: [DocSection] -> ShowTableOfContents
findToC [] = ShowTableOfContents
NoToC
findToC (DocSection
TableOfContents:[DocSection]
_) = ShowTableOfContents
ToC
findToC (DocSection
_:[DocSection]
dds) = [DocSection] -> ShowTableOfContents
findToC [DocSection]
dds