{-# 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 qualified Data.Drasil.TheoryConcepts as Doc (dataDefn, genDefn, inModel, thModel)
toToC :: DocSection -> ItemType
toToC :: DocSection -> ItemType
toToC TableOfContents = ItemType
mktToCSec
toToC (RefSec rs :: RefSec
rs) = RefSec -> ItemType
mktRefSec RefSec
rs
toToC (IntroSec i :: IntroSec
i) = IntroSec -> ItemType
mktIntroSec IntroSec
i
toToC (StkhldrSec sts :: StkhldrSec
sts) = StkhldrSec -> ItemType
mktStkhldrSec StkhldrSec
sts
toToC (GSDSec gs' :: GSDSec
gs') = GSDSec -> ItemType
mktGSDSec GSDSec
gs'
toToC (SSDSec ss :: SSDSec
ss) = SSDSec -> ItemType
mktSSDSec SSDSec
ss
toToC (ReqrmntSec r :: ReqrmntSec
r) = ReqrmntSec -> ItemType
mktReqrmntSec ReqrmntSec
r
toToC (LCsSec lc :: LCsSec
lc) = LCsSec -> ItemType
mktLCsSec LCsSec
lc
toToC (UCsSec ulcs :: UCsSec
ulcs) = UCsSec -> ItemType
mktUCsSec UCsSec
ulcs
toToC (TraceabilitySec t :: TraceabilitySec
t) = TraceabilitySec -> ItemType
mktTraceabilitySec TraceabilitySec
t
toToC (AuxConstntSec acs :: AuxConstntSec
acs) = AuxConstntSec -> ItemType
mktAuxConsSec AuxConstntSec
acs
toToC Bibliography = ItemType
mktBib
toToC (AppndxSec a :: AppndxSec
a) = AppndxSec -> ItemType
mktAppndxSec AppndxSec
a
toToC (OffShelfSolnsSec o :: OffShelfSolnsSec
o) = OffShelfSolnsSec -> ItemType
mktOffShelfSolnSec OffShelfSolnsSec
o
mkHeaderItem :: Sentence -> [Sentence] -> ItemType
hdr :: Sentence
hdr itm :: [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 (\x :: Sentence
x -> (Sentence -> ItemType
Flat Sentence
x, Maybe String
forall a. Maybe a
Nothing)) [Sentence]
itm
mkHeaderItem' :: Sentence -> [ItemType] -> ItemType
hdr :: Sentence
hdr itm :: [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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.tOfCont
mktRefSec :: RefSec -> ItemType
mktRefSec :: RefSec -> ItemType
mktRefSec (RefProg _ l :: [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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
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 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.tOfUnit
mktSubRef (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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.tOfUnit
mktSubRef (TSymb _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.tOfSymb
mktSubRef (TSymb' _ _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.tOfSymb
mktSubRef TAandA = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.abbAcc
mktIntroSec :: IntroSec -> ItemType
mktIntroSec :: IntroSec -> ItemType
mktIntroSec (IntroProg _ _ l :: [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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
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 _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
Doc.prpsOfDoc
mktSubIntro (IScope _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
Doc.orgOfDoc
mktStkhldrSec:: StkhldrSec -> ItemType
mktStkhldrSec :: StkhldrSec -> ItemType
mktStkhldrSec (StkhldrProg l :: [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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
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 _ _) = 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
$ NamedChunk -> NP
forall t. NamedIdea t => t -> NP
the NamedChunk
Doc.customer
mktSub (Cstmr _) = 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
$ NamedChunk -> NP
forall t. NamedIdea t => t -> NP
the NamedChunk
Doc.client
mktGSDSec :: GSDSec -> ItemType
mktGSDSec :: GSDSec -> ItemType
mktGSDSec (GSDProg l :: [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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
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 _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
Doc.sysCont
mktSub (UsrChars _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.userCharacteristic
mktSub (SystCons _ _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.systemConstraint
mktSSDSec :: SSDSec -> ItemType
mktSSDSec :: SSDSec -> ItemType
mktSSDSec (SSDProg l :: [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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
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 _ _ sl1 :: [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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
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 sl2 :: [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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
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 _ _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
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 _ _) = 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 _) = 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
Doc.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
Doc.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
Doc.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
Doc.inModel
mktSubSCS (Constraints _ _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.datumConstraint
mktSubSCS (CorrSolnPpties _ _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.propOfCorSol
mktReqrmntSec :: ReqrmntSec -> ItemType
mktReqrmntSec :: ReqrmntSec -> ItemType
mktReqrmntSec (ReqsProg l :: [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' _ _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.functionalRequirement
mktSubs (FReqsSub _ _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.functionalRequirement
mktSubs (NonFReqsSub _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.nonfunctionalRequirement
mktLCsSec :: LCsSec -> ItemType
mktLCsSec :: LCsSec -> ItemType
mktLCsSec (LCsProg _) = 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 _) = 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 _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.traceyMandG
mktAuxConsSec :: AuxConstntSec -> ItemType
mktAuxConsSec :: AuxConstntSec -> ItemType
mktAuxConsSec (AuxConsProg _ _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.reference
mktAppndxSec :: AppndxSec -> ItemType
mktAppndxSec :: AppndxSec -> ItemType
mktAppndxSec (AppndxProg _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize NamedChunk
Doc.appendix
mktOffShelfSolnSec :: OffShelfSolnsSec -> ItemType
mktOffShelfSolnSec :: OffShelfSolnsSec -> ItemType
mktOffShelfSolnSec (OffShelfSolnsProg _) = 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
$ NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
Doc.offShelfSolution
findToC :: [DocSection] -> ShowTableOfContents
findToC :: [DocSection] -> ShowTableOfContents
findToC [] = ShowTableOfContents
NoToC
findToC (TableOfContents:_) = ShowTableOfContents
ToC
findToC (_:dds :: [DocSection]
dds) = [DocSection] -> ShowTableOfContents
findToC [DocSection]
dds