{-# LANGUAGE GADTs #-}
module Drasil.DocumentLanguage.Core where
import Drasil.DocumentLanguage.Definitions (Fields)
import Drasil.DocumentLanguage.TraceabilityMatrix (TraceViewCat)
import Language.Drasil hiding (Manual, Verb)
import Theory.Drasil (DataDefinition, GenDefn, InstanceModel, TheoryModel)
import Data.Generics.Multiplate (Multiplate(multiplate, mkPlate))
type System = Sentence
type DocKind = Sentence
type DocDesc = [DocSection]
data DocSection = TableOfContents
| RefSec RefSec
| IntroSec IntroSec
| StkhldrSec StkhldrSec
| GSDSec GSDSec
| SSDSec SSDSec
| ReqrmntSec ReqrmntSec
| LCsSec LCsSec
| UCsSec UCsSec
| TraceabilitySec TraceabilitySec
| AuxConstntSec AuxConstntSec
| Bibliography
| AppndxSec AppndxSec
| OffShelfSolnsSec OffShelfSolnsSec
data RefSec = RefProg Contents [RefTab]
data RefTab where
TUnits :: RefTab
TUnits' :: [TUIntro] -> ([UnitDefn] -> LabelledContent) -> RefTab
TSymb :: [TSIntro] -> RefTab
TSymb' :: LFunc -> [TSIntro] -> RefTab
TAandA :: RefTab
data TSIntro = TypogConvention [TConvention]
| SymbOrder
| SymbConvention [Literature]
| TSPurpose
| VectorUnits
data TConvention = Vector Emphasis
| Verb Sentence
data Emphasis = Bold
| Italics
instance Show Emphasis where
show :: Emphasis -> String
show Emphasis
Bold = String
"bold"
show Emphasis
Italics = String
"italics"
data Literature = Lit Topic
| Doc Topic
| Doc' Topic
| Manual Topic
type Topic = IdeaDict
data TUIntro = System
| Derived
| TUPurpose
data LFunc where
Term :: LFunc
Defn :: LFunc
TermExcept :: [DefinedQuantityDict] -> LFunc
DefnExcept :: [DefinedQuantityDict] -> LFunc
TAD :: LFunc
data IntroSec = IntroProg Sentence Sentence [IntroSub]
data IntroSub where
IPurpose :: [Sentence] -> IntroSub
IScope :: Sentence -> IntroSub
IChar :: [Sentence] -> [Sentence] -> [Sentence] -> IntroSub
IOrgSec :: CI -> Section -> Sentence -> IntroSub
newtype StkhldrSec = StkhldrProg [StkhldrSub]
data StkhldrSub where
Client :: CI -> Sentence -> StkhldrSub
Cstmr :: CI -> StkhldrSub
newtype GSDSec = GSDProg [GSDSub]
data GSDSub where
SysCntxt :: [Contents] -> GSDSub
UsrChars :: [Contents] -> GSDSub
SystCons :: [Contents] -> [Section] -> GSDSub
newtype SSDSec = SSDProg [SSDSub]
data SSDSub where
SSDProblem :: ProblemDescription -> SSDSub
SSDSolChSpec :: SolChSpec -> SSDSub
data ProblemDescription where
PDProg :: Sentence -> [Section] -> [PDSub] -> ProblemDescription
data PDSub where
TermsAndDefs :: Concept c => Maybe Sentence -> [c] -> PDSub
PhySysDesc :: Idea a => a -> [Sentence] -> LabelledContent -> [Contents] -> PDSub
Goals :: [Sentence] -> [ConceptInstance] -> PDSub
data SolChSpec where
SCSProg :: [SCSSub] -> SolChSpec
data SCSSub where
Assumptions :: [ConceptInstance] -> SCSSub
TMs :: [Sentence] -> Fields -> [TheoryModel] -> SCSSub
GDs :: [Sentence] -> Fields -> [GenDefn] -> DerivationDisplay -> SCSSub
DDs :: [Sentence] -> Fields -> [DataDefinition] -> DerivationDisplay -> SCSSub
IMs :: [Sentence] -> Fields -> [InstanceModel] -> DerivationDisplay -> SCSSub
Constraints :: (HasUncertainty c, Quantity c, Constrained c, HasReasVal c, MayHaveUnit c) => Sentence -> [c] -> SCSSub
CorrSolnPpties :: (Quantity c, Constrained c) => [c] -> [Contents] -> SCSSub
data DerivationDisplay = ShowDerivation
| HideDerivation
newtype ReqrmntSec = ReqsProg [ReqsSub]
data ReqsSub where
FReqsSub' :: [ConceptInstance] -> [LabelledContent] -> ReqsSub
FReqsSub :: [ConceptInstance] -> [LabelledContent] -> ReqsSub
NonFReqsSub :: [ConceptInstance] -> ReqsSub
newtype LCsSec = LCsProg [ConceptInstance]
newtype UCsSec = UCsProg [ConceptInstance]
newtype TraceabilitySec = TraceabilityProg [TraceConfig]
data TraceConfig = TraceConfig UID [Sentence] Sentence [TraceViewCat] [TraceViewCat]
getTraceConfigUID :: TraceConfig -> UID
getTraceConfigUID :: TraceConfig -> UID
getTraceConfigUID (TraceConfig UID
a [Sentence]
_ Sentence
_ [TraceViewCat]
_ [TraceViewCat]
_) = UID
a
newtype OffShelfSolnsSec = OffShelfSolnsProg [Contents]
data AuxConstntSec = AuxConsProg CI [ConstQDef]
newtype AppndxSec = AppndxProg [Contents]
data DLPlate f = DLPlate {
forall (f :: * -> *). DLPlate f -> DocSection -> f DocSection
docSec :: DocSection -> f DocSection,
forall (f :: * -> *). DLPlate f -> RefSec -> f RefSec
refSec :: RefSec -> f RefSec,
forall (f :: * -> *). DLPlate f -> IntroSec -> f IntroSec
introSec :: IntroSec -> f IntroSec,
forall (f :: * -> *). DLPlate f -> IntroSub -> f IntroSub
introSub :: IntroSub -> f IntroSub,
forall (f :: * -> *). DLPlate f -> StkhldrSec -> f StkhldrSec
stkSec :: StkhldrSec -> f StkhldrSec,
forall (f :: * -> *). DLPlate f -> StkhldrSub -> f StkhldrSub
stkSub :: StkhldrSub -> f StkhldrSub,
forall (f :: * -> *). DLPlate f -> GSDSec -> f GSDSec
gsdSec :: GSDSec -> f GSDSec,
forall (f :: * -> *). DLPlate f -> GSDSub -> f GSDSub
gsdSub :: GSDSub -> f GSDSub,
forall (f :: * -> *). DLPlate f -> SSDSec -> f SSDSec
ssdSec :: SSDSec -> f SSDSec,
forall (f :: * -> *). DLPlate f -> SSDSub -> f SSDSub
ssdSub :: SSDSub -> f SSDSub,
forall (f :: * -> *).
DLPlate f -> ProblemDescription -> f ProblemDescription
pdSec :: ProblemDescription -> f ProblemDescription,
forall (f :: * -> *). DLPlate f -> PDSub -> f PDSub
pdSub :: PDSub -> f PDSub,
forall (f :: * -> *). DLPlate f -> SCSSub -> f SCSSub
scsSub :: SCSSub -> f SCSSub,
forall (f :: * -> *). DLPlate f -> ReqrmntSec -> f ReqrmntSec
reqSec :: ReqrmntSec -> f ReqrmntSec,
forall (f :: * -> *). DLPlate f -> ReqsSub -> f ReqsSub
reqSub :: ReqsSub -> f ReqsSub,
forall (f :: * -> *). DLPlate f -> LCsSec -> f LCsSec
lcsSec :: LCsSec -> f LCsSec,
forall (f :: * -> *). DLPlate f -> UCsSec -> f UCsSec
ucsSec :: UCsSec -> f UCsSec,
forall (f :: * -> *).
DLPlate f -> TraceabilitySec -> f TraceabilitySec
traceSec :: TraceabilitySec -> f TraceabilitySec,
forall (f :: * -> *).
DLPlate f -> OffShelfSolnsSec -> f OffShelfSolnsSec
offShelfSec :: OffShelfSolnsSec -> f OffShelfSolnsSec,
forall (f :: * -> *). DLPlate f -> AuxConstntSec -> f AuxConstntSec
auxConsSec :: AuxConstntSec -> f AuxConstntSec,
forall (f :: * -> *). DLPlate f -> AppndxSec -> f AppndxSec
appendSec :: AppndxSec -> f AppndxSec
}
instance Multiplate DLPlate where
multiplate :: forall (f :: * -> *). Applicative f => DLPlate f -> DLPlate f
multiplate DLPlate f
p = forall (f :: * -> *).
(DocSection -> f DocSection)
-> (RefSec -> f RefSec)
-> (IntroSec -> f IntroSec)
-> (IntroSub -> f IntroSub)
-> (StkhldrSec -> f StkhldrSec)
-> (StkhldrSub -> f StkhldrSub)
-> (GSDSec -> f GSDSec)
-> (GSDSub -> f GSDSub)
-> (SSDSec -> f SSDSec)
-> (SSDSub -> f SSDSub)
-> (ProblemDescription -> f ProblemDescription)
-> (PDSub -> f PDSub)
-> (SCSSub -> f SCSSub)
-> (ReqrmntSec -> f ReqrmntSec)
-> (ReqsSub -> f ReqsSub)
-> (LCsSec -> f LCsSec)
-> (UCsSec -> f UCsSec)
-> (TraceabilitySec -> f TraceabilitySec)
-> (OffShelfSolnsSec -> f OffShelfSolnsSec)
-> (AuxConstntSec -> f AuxConstntSec)
-> (AppndxSec -> f AppndxSec)
-> DLPlate f
DLPlate DocSection -> f DocSection
ds forall {f :: * -> *}. Applicative f => RefSec -> f RefSec
res IntroSec -> f IntroSec
intro forall {f :: * -> *}. Applicative f => IntroSub -> f IntroSub
intro' StkhldrSec -> f StkhldrSec
stk forall {f :: * -> *}. Applicative f => StkhldrSub -> f StkhldrSub
stk' GSDSec -> f GSDSec
gs forall {f :: * -> *}. Applicative f => GSDSub -> f GSDSub
gs' SSDSec -> f SSDSec
ss SSDSub -> f SSDSub
ss' ProblemDescription -> f ProblemDescription
pd forall {f :: * -> *}. Applicative f => PDSub -> f PDSub
pd' forall {f :: * -> *}. Applicative f => SCSSub -> f SCSSub
sc
ReqrmntSec -> f ReqrmntSec
rs forall {f :: * -> *}. Applicative f => ReqsSub -> f ReqsSub
rs' forall {f :: * -> *}. Applicative f => LCsSec -> f LCsSec
lcp forall {f :: * -> *}. Applicative f => UCsSec -> f UCsSec
ucp forall {f :: * -> *}.
Applicative f =>
TraceabilitySec -> f TraceabilitySec
ts forall {f :: * -> *}.
Applicative f =>
OffShelfSolnsSec -> f OffShelfSolnsSec
es forall {f :: * -> *}.
Applicative f =>
AuxConstntSec -> f AuxConstntSec
acs forall {f :: * -> *}. Applicative f => AppndxSec -> f AppndxSec
aps where
ds :: DocSection -> f DocSection
ds DocSection
TableOfContents = forall (f :: * -> *) a. Applicative f => a -> f a
pure DocSection
TableOfContents
ds (RefSec RefSec
x) = RefSec -> DocSection
RefSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> RefSec -> f RefSec
refSec DLPlate f
p RefSec
x
ds (IntroSec IntroSec
x) = IntroSec -> DocSection
IntroSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> IntroSec -> f IntroSec
introSec DLPlate f
p IntroSec
x
ds (StkhldrSec StkhldrSec
x) = StkhldrSec -> DocSection
StkhldrSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> StkhldrSec -> f StkhldrSec
stkSec DLPlate f
p StkhldrSec
x
ds (GSDSec GSDSec
x) = GSDSec -> DocSection
GSDSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> GSDSec -> f GSDSec
gsdSec DLPlate f
p GSDSec
x
ds (SSDSec SSDSec
x) = SSDSec -> DocSection
SSDSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> SSDSec -> f SSDSec
ssdSec DLPlate f
p SSDSec
x
ds (ReqrmntSec ReqrmntSec
x) = ReqrmntSec -> DocSection
ReqrmntSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> ReqrmntSec -> f ReqrmntSec
reqSec DLPlate f
p ReqrmntSec
x
ds (LCsSec LCsSec
x) = LCsSec -> DocSection
LCsSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> LCsSec -> f LCsSec
lcsSec DLPlate f
p LCsSec
x
ds (UCsSec UCsSec
x) = UCsSec -> DocSection
UCsSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> UCsSec -> f UCsSec
ucsSec DLPlate f
p UCsSec
x
ds (TraceabilitySec TraceabilitySec
x) = TraceabilitySec -> DocSection
TraceabilitySec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *).
DLPlate f -> TraceabilitySec -> f TraceabilitySec
traceSec DLPlate f
p TraceabilitySec
x
ds (OffShelfSolnsSec OffShelfSolnsSec
x) = OffShelfSolnsSec -> DocSection
OffShelfSolnsSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *).
DLPlate f -> OffShelfSolnsSec -> f OffShelfSolnsSec
offShelfSec DLPlate f
p OffShelfSolnsSec
x
ds (AuxConstntSec AuxConstntSec
x) = AuxConstntSec -> DocSection
AuxConstntSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> AuxConstntSec -> f AuxConstntSec
auxConsSec DLPlate f
p AuxConstntSec
x
ds (AppndxSec AppndxSec
x) = AppndxSec -> DocSection
AppndxSec forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *). DLPlate f -> AppndxSec -> f AppndxSec
appendSec DLPlate f
p AppndxSec
x
ds DocSection
Bibliography = forall (f :: * -> *) a. Applicative f => a -> f a
pure DocSection
Bibliography
res :: RefSec -> f RefSec
res (RefProg Contents
c [RefTab]
x) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Contents -> [RefTab] -> RefSec
RefProg Contents
c [RefTab]
x
intro :: IntroSec -> f IntroSec
intro (IntroProg Sentence
s1 Sentence
s2 [IntroSub]
progs) = Sentence -> Sentence -> [IntroSub] -> IntroSec
IntroProg Sentence
s1 Sentence
s2 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (forall (f :: * -> *). DLPlate f -> IntroSub -> f IntroSub
introSub DLPlate f
p) [IntroSub]
progs
intro' :: IntroSub -> f IntroSub
intro' (IPurpose [Sentence]
s) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Sentence] -> IntroSub
IPurpose [Sentence]
s
intro' (IScope Sentence
s) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Sentence -> IntroSub
IScope Sentence
s
intro' (IChar [Sentence]
s1 [Sentence]
s2 [Sentence]
s3) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Sentence] -> [Sentence] -> [Sentence] -> IntroSub
IChar [Sentence]
s1 [Sentence]
s2 [Sentence]
s3
intro' (IOrgSec CI
c Section
sect Sentence
s2) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ CI -> Section -> Sentence -> IntroSub
IOrgSec CI
c Section
sect Sentence
s2
stk :: StkhldrSec -> f StkhldrSec
stk (StkhldrProg [StkhldrSub]
progs) = [StkhldrSub] -> StkhldrSec
StkhldrProg forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (forall (f :: * -> *). DLPlate f -> StkhldrSub -> f StkhldrSub
stkSub DLPlate f
p) [StkhldrSub]
progs
stk' :: StkhldrSub -> f StkhldrSub
stk' (Client CI
c Sentence
s) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ CI -> Sentence -> StkhldrSub
Client CI
c Sentence
s
stk' (Cstmr CI
c) = forall (f :: * -> *) a. Applicative f => a -> f a
pure (CI -> StkhldrSub
Cstmr CI
c)
gs :: GSDSec -> f GSDSec
gs (GSDProg [GSDSub]
x) = [GSDSub] -> GSDSec
GSDProg forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (forall (f :: * -> *). DLPlate f -> GSDSub -> f GSDSub
gsdSub DLPlate f
p) [GSDSub]
x
gs' :: GSDSub -> f GSDSub
gs' (SysCntxt [Contents]
c) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Contents] -> GSDSub
SysCntxt [Contents]
c
gs' (UsrChars [Contents]
c) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Contents] -> GSDSub
UsrChars [Contents]
c
gs' (SystCons [Contents]
c [Section]
s) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Contents] -> [Section] -> GSDSub
SystCons [Contents]
c [Section]
s
ss :: SSDSec -> f SSDSec
ss (SSDProg [SSDSub]
progs) = [SSDSub] -> SSDSec
SSDProg forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (forall (f :: * -> *). DLPlate f -> SSDSub -> f SSDSub
ssdSub DLPlate f
p) [SSDSub]
progs
ss' :: SSDSub -> f SSDSub
ss' (SSDProblem ProblemDescription
prog) = ProblemDescription -> SSDSub
SSDProblem forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *).
DLPlate f -> ProblemDescription -> f ProblemDescription
pdSec DLPlate f
p ProblemDescription
prog
ss' (SSDSolChSpec (SCSProg [SCSSub]
spec)) = SolChSpec -> SSDSub
SSDSolChSpec forall b c a. (b -> c) -> (a -> b) -> a -> c
. [SCSSub] -> SolChSpec
SCSProg forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (forall (f :: * -> *). DLPlate f -> SCSSub -> f SCSSub
scsSub DLPlate f
p) [SCSSub]
spec
pd :: ProblemDescription -> f ProblemDescription
pd (PDProg Sentence
s [Section]
sect [PDSub]
progs) = Sentence -> [Section] -> [PDSub] -> ProblemDescription
PDProg Sentence
s [Section]
sect forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (forall (f :: * -> *). DLPlate f -> PDSub -> f PDSub
pdSub DLPlate f
p) [PDSub]
progs
pd' :: PDSub -> f PDSub
pd' (TermsAndDefs Maybe Sentence
s [c]
cs) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall c. Concept c => Maybe Sentence -> [c] -> PDSub
TermsAndDefs Maybe Sentence
s [c]
cs
pd' (Goals [Sentence]
s [ConceptInstance]
ci) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Sentence] -> [ConceptInstance] -> PDSub
Goals [Sentence]
s [ConceptInstance]
ci
pd' (PhySysDesc a
nm [Sentence]
s LabelledContent
lc [Contents]
c) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall c.
Idea c =>
c -> [Sentence] -> LabelledContent -> [Contents] -> PDSub
PhySysDesc a
nm [Sentence]
s LabelledContent
lc [Contents]
c
sc :: SCSSub -> f SCSSub
sc (Assumptions [ConceptInstance]
c) = forall (f :: * -> *) a. Applicative f => a -> f a
pure ([ConceptInstance] -> SCSSub
Assumptions [ConceptInstance]
c)
sc (TMs [Sentence]
s Fields
f [TheoryModel]
t) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Sentence] -> Fields -> [TheoryModel] -> SCSSub
TMs [Sentence]
s Fields
f [TheoryModel]
t
sc (GDs [Sentence]
s Fields
f [GenDefn]
g DerivationDisplay
d) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Sentence] -> Fields -> [GenDefn] -> DerivationDisplay -> SCSSub
GDs [Sentence]
s Fields
f [GenDefn]
g DerivationDisplay
d
sc (DDs [Sentence]
s Fields
f [DataDefinition]
dd DerivationDisplay
d) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Sentence]
-> Fields -> [DataDefinition] -> DerivationDisplay -> SCSSub
DDs [Sentence]
s Fields
f [DataDefinition]
dd DerivationDisplay
d
sc (IMs [Sentence]
s Fields
f [InstanceModel]
i DerivationDisplay
d) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Sentence]
-> Fields -> [InstanceModel] -> DerivationDisplay -> SCSSub
IMs [Sentence]
s Fields
f [InstanceModel]
i DerivationDisplay
d
sc (Constraints Sentence
s [c]
c) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall c.
(HasUncertainty c, Quantity c, Constrained c, HasReasVal c,
MayHaveUnit c) =>
Sentence -> [c] -> SCSSub
Constraints Sentence
s [c]
c
sc (CorrSolnPpties [c]
c [Contents]
cs) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall c.
(Quantity c, Constrained c) =>
[c] -> [Contents] -> SCSSub
CorrSolnPpties [c]
c [Contents]
cs
rs :: ReqrmntSec -> f ReqrmntSec
rs (ReqsProg [ReqsSub]
reqs) = [ReqsSub] -> ReqrmntSec
ReqsProg forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (forall (f :: * -> *). DLPlate f -> ReqsSub -> f ReqsSub
reqSub DLPlate f
p) [ReqsSub]
reqs
rs' :: ReqsSub -> f ReqsSub
rs' (FReqsSub [ConceptInstance]
ci [LabelledContent]
con) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> [LabelledContent] -> ReqsSub
FReqsSub [ConceptInstance]
ci [LabelledContent]
con
rs' (FReqsSub' [ConceptInstance]
ci [LabelledContent]
con) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> [LabelledContent] -> ReqsSub
FReqsSub' [ConceptInstance]
ci [LabelledContent]
con
rs' (NonFReqsSub [ConceptInstance]
c) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> ReqsSub
NonFReqsSub [ConceptInstance]
c
lcp :: LCsSec -> f LCsSec
lcp (LCsProg [ConceptInstance]
c) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> LCsSec
LCsProg [ConceptInstance]
c
ucp :: UCsSec -> f UCsSec
ucp (UCsProg [ConceptInstance]
c) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> UCsSec
UCsProg [ConceptInstance]
c
ts :: TraceabilitySec -> f TraceabilitySec
ts (TraceabilityProg [TraceConfig]
progs) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [TraceConfig] -> TraceabilitySec
TraceabilityProg [TraceConfig]
progs
es :: OffShelfSolnsSec -> f OffShelfSolnsSec
es (OffShelfSolnsProg [Contents]
contents) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Contents] -> OffShelfSolnsSec
OffShelfSolnsProg [Contents]
contents
acs :: AuxConstntSec -> f AuxConstntSec
acs (AuxConsProg CI
ci [ConstQDef]
qdef) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ CI -> [ConstQDef] -> AuxConstntSec
AuxConsProg CI
ci [ConstQDef]
qdef
aps :: AppndxSec -> f AppndxSec
aps (AppndxProg [Contents]
con) = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ [Contents] -> AppndxSec
AppndxProg [Contents]
con
mkPlate :: forall (f :: * -> *).
(forall a. Projector DLPlate a -> a -> f a) -> DLPlate f
mkPlate forall a. Projector DLPlate a -> a -> f a
b = forall (f :: * -> *).
(DocSection -> f DocSection)
-> (RefSec -> f RefSec)
-> (IntroSec -> f IntroSec)
-> (IntroSub -> f IntroSub)
-> (StkhldrSec -> f StkhldrSec)
-> (StkhldrSub -> f StkhldrSub)
-> (GSDSec -> f GSDSec)
-> (GSDSub -> f GSDSub)
-> (SSDSec -> f SSDSec)
-> (SSDSub -> f SSDSub)
-> (ProblemDescription -> f ProblemDescription)
-> (PDSub -> f PDSub)
-> (SCSSub -> f SCSSub)
-> (ReqrmntSec -> f ReqrmntSec)
-> (ReqsSub -> f ReqsSub)
-> (LCsSec -> f LCsSec)
-> (UCsSec -> f UCsSec)
-> (TraceabilitySec -> f TraceabilitySec)
-> (OffShelfSolnsSec -> f OffShelfSolnsSec)
-> (AuxConstntSec -> f AuxConstntSec)
-> (AppndxSec -> f AppndxSec)
-> DLPlate f
DLPlate (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> DocSection -> f DocSection
docSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> RefSec -> f RefSec
refSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> IntroSec -> f IntroSec
introSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> IntroSub -> f IntroSub
introSub) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> StkhldrSec -> f StkhldrSec
stkSec)
(forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> StkhldrSub -> f StkhldrSub
stkSub) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> GSDSec -> f GSDSec
gsdSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> GSDSub -> f GSDSub
gsdSub) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> SSDSec -> f SSDSec
ssdSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> SSDSub -> f SSDSub
ssdSub) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *).
DLPlate f -> ProblemDescription -> f ProblemDescription
pdSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> PDSub -> f PDSub
pdSub)
(forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> SCSSub -> f SCSSub
scsSub) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> ReqrmntSec -> f ReqrmntSec
reqSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> ReqsSub -> f ReqsSub
reqSub) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> LCsSec -> f LCsSec
lcsSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> UCsSec -> f UCsSec
ucsSec)
(forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *).
DLPlate f -> TraceabilitySec -> f TraceabilitySec
traceSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *).
DLPlate f -> OffShelfSolnsSec -> f OffShelfSolnsSec
offShelfSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> AuxConstntSec -> f AuxConstntSec
auxConsSec) (forall a. Projector DLPlate a -> a -> f a
b forall (f :: * -> *). DLPlate f -> AppndxSec -> f AppndxSec
appendSec)