{-# LANGUAGE GADTs #-}
-- | Defines core types for use with the Drasil document language ("Drasil.DocumentLanguage").
module Drasil.DocumentLanguage.Core where

import Drasil.DocumentLanguage.Definitions (Fields)
import Drasil.DocumentLanguage.TraceabilityMatrix (TraceViewCat)
import Language.Drasil hiding (Manual, Verb) -- Manual - Citation name conflict. FIXME: Move to different namespace
import Theory.Drasil (DataDefinition, GenDefn, InstanceModel, TheoryModel)


import Data.Generics.Multiplate (Multiplate(multiplate, mkPlate))

-- | Type synonym for clarity.
type System = Sentence
-- | Type synonym for clarity.
type DocKind = Sentence

-- * Document Types

-- | A document description is made up of document sections.
type DocDesc = [DocSection]

-- | Document sections are either Reference, Introduction, or Specific
-- System Description sections (for now!).
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

-- ** Reference Material Section

-- | Reference section. Contents are top level followed by a list of subsections.
data RefSec = RefProg Contents [RefTab]

-- | Reference subsections (tables) made out of units or symbols (can be customized).
data RefTab where
  -- | Default table of units.
  TUnits :: RefTab
  -- | Customized introduction.
  TUnits' :: [TUIntro] -> ([UnitDefn] -> LabelledContent) -> RefTab
  -- | Adds an introduction for a table of symbols.
  TSymb :: [TSIntro] -> RefTab
  -- | Allows Lens functions in addition to an introduction for a table of symbols.
  TSymb' :: LFunc -> [TSIntro] -> RefTab
  -- | Default.
  TAandA :: RefTab
  -- add more here

-- | For creating a table of symbols introduction
data TSIntro = TypogConvention [TConvention] -- ^ Typographic conventions used.
             | SymbOrder -- ^ Symbol ordering (defaults to alphabetical).
             | SymbConvention [Literature] -- ^ Symbol conventions match specified literature.
             | TSPurpose -- ^ Purpose of the Table of Symbols.
             | VectorUnits -- ^ Definition of vector components.

-- | Possible typographic conventions.
data TConvention = Vector Emphasis -- ^ How vectors are emphasized.
                 | Verb Sentence -- ^ Verbatim for specialized conventions.

-- | How to handle emphasis of words.
data Emphasis = Bold
              | Italics

instance Show Emphasis where
  show :: Emphasis -> String
show Emphasis
Bold = String
"bold"
  show Emphasis
Italics = String
"italics"

-- | Types of literature.
data Literature = Lit Topic -- ^ Literature (with a Topic).
                | Doc Topic -- ^ Existing documentation for (singular topic).
                | Doc' Topic -- ^ Existing documentation for (plural version of topic).
                | Manual Topic -- ^ Manual.

-- | Type synonym for clarity.
type Topic = IdeaDict

-- | For creating the table of units introduction.
data TUIntro = System -- ^ System of units (defaults to SI).
             | Derived -- ^ Sentence about derived units being used alongside SI.
             | TUPurpose -- ^ Purpose of the table of units.

-- | Lens (lookup) functions (currently for TSymb).
data LFunc where
  Term :: LFunc
  Defn :: LFunc
  TermExcept :: [DefinedQuantityDict] -> LFunc
  DefnExcept :: [DefinedQuantityDict] -> LFunc
  TAD :: LFunc -- ^ Term and Definition.

-- ** Introduction Section

-- | Introduction section. Contents are top level followed by a list of
-- subsections.
data IntroSec = IntroProg Sentence Sentence [IntroSub]
  -- ^ Temporary, will be modified once we've figured out more about the section.

-- | Introduction subsections.
data IntroSub where
  -- | Describes purpose of the system.
  IPurpose :: [Sentence] -> IntroSub
  -- | Describes scope of the system.
  IScope   :: Sentence -> IntroSub
  -- | Describes characteristics of the system.
  IChar   :: [Sentence] -> [Sentence] -> [Sentence] -> IntroSub
  -- | Organises the section.
  IOrgSec  :: CI -> Section -> Sentence -> IntroSub

-- ** Stakeholders Section

-- | Stakeholders section (wraps stakeholders subsections 'StkhldrSub').
newtype StkhldrSec = StkhldrProg [StkhldrSub]

-- | Stakeholders subsections.
data StkhldrSub where
  -- | May have a client.
  Client :: CI -> Sentence -> StkhldrSub 
  -- | May have a customer.
  Cstmr  :: CI -> StkhldrSub 

-- ** General System Description Section

-- | General System Description section (wraps 'GSDSub' subsections).
newtype GSDSec = GSDProg [GSDSub]

-- | General System Description subsections.
data GSDSub where
  -- | System context.
  SysCntxt   :: [Contents] -> GSDSub --FIXME: partially automate
  -- | User characteristics.
  UsrChars   :: [Contents] -> GSDSub 
  -- | System constraints.
  SystCons   :: [Contents] -> [Section] -> GSDSub 

-- ** Specific System Description Section

-- | Specific System Description section. Contains a list of subsections ('SSDSub').
newtype SSDSec = SSDProg [SSDSub]

-- | Specific System Description subsections.
data SSDSub where
  -- | System description problems.
  SSDProblem :: ProblemDescription -> SSDSub
  -- | Solution characteristics specification.
  SSDSolChSpec :: SolChSpec -> SSDSub

-- | Problem Description section. Contains an intro or title,
-- 'Section's, and problem description subsections ('PDSub').
data ProblemDescription where
  PDProg :: Sentence -> [Section] -> [PDSub] -> ProblemDescription

-- | Problem Description subsections.
data PDSub where
  -- | Terms and definitions.
  TermsAndDefs :: Concept c => Maybe Sentence -> [c] -> PDSub
  -- | Physical system description.
  PhySysDesc :: Idea a => a -> [Sentence] -> LabelledContent -> [Contents] -> PDSub
  -- | Goals.
  Goals :: [Sentence] -> [ConceptInstance] -> PDSub

-- | Solution Characteristics Specification section. Contains a list of subsections ('SCSSub').
data SolChSpec where
  SCSProg :: [SCSSub] -> SolChSpec

-- | Solution Characteristics Specification subsections.
data SCSSub where
  -- | Assumptions.
  Assumptions    :: [ConceptInstance] -> SCSSub
  -- | Theory Models.
  TMs            :: [Sentence] -> Fields  -> [TheoryModel] -> SCSSub
  -- | General Definitions.
  GDs            :: [Sentence] -> Fields  -> [GenDefn] -> DerivationDisplay -> SCSSub
  -- | Data Definitions.
  DDs            :: [Sentence] -> Fields  -> [DataDefinition] -> DerivationDisplay -> SCSSub -- (FIXME: Need DD intro).
  -- | Instance Models.
  IMs            :: [Sentence] -> Fields  -> [InstanceModel] -> DerivationDisplay -> SCSSub
  -- | Constraints.
  Constraints    :: (HasUncertainty c, Quantity c, Constrained c, HasReasVal c, MayHaveUnit c) => Sentence -> [c] -> SCSSub 
  --                  Sentence -> [LabelledContent] Fields  -> [UncertainWrapper] -> [ConstrainedChunk] -> SCSSub --FIXME: temporary definition?
  --FIXME: Work in Progress ^
  -- | Properties of a correct solution.
  CorrSolnPpties :: (Quantity c, Constrained c) => [c] -> [Contents] -> SCSSub

-- | Choose whether to show or hide the derivation of an expression.
data DerivationDisplay = ShowDerivation
                       | HideDerivation

-- ** Requirements Section

-- | Requirements section. Contains a list of subsections ('ReqsSub').
newtype ReqrmntSec = ReqsProg [ReqsSub]

-- | Requirements subsections. 
data ReqsSub where
  -- | Functional requirements. LabelledContent needed for tables.  
  FReqsSub'   :: [ConceptInstance] -> [LabelledContent] -> ReqsSub
  -- | Functional requirements. LabelledContent needed for tables.
  FReqsSub    :: [ConceptInstance] -> [LabelledContent] -> ReqsSub
  -- | Non-functional requirements.
  NonFReqsSub :: [ConceptInstance] -> ReqsSub

-- ** Likely Changes Section

-- | Likely Changes section.
newtype LCsSec = LCsProg [ConceptInstance]

-- ** Unlikely Changes Section

-- | Unlikely Changes section.
newtype UCsSec = UCsProg [ConceptInstance]

-- ** Traceability Section

-- | Traceability Matices and Graphs section. Contains configurations ('TraceConfig').
newtype TraceabilitySec = TraceabilityProg [TraceConfig]

-- | Traceability Matices and Graphs configurations.
data TraceConfig = TraceConfig UID [Sentence] Sentence [TraceViewCat] [TraceViewCat]

getTraceConfigUID :: TraceConfig -> UID
getTraceConfigUID :: TraceConfig -> UID
getTraceConfigUID (TraceConfig UID
a [Sentence]
_ Sentence
_ [TraceViewCat]
_ [TraceViewCat]
_) = UID
a

-- ** Off-The-Shelf Solutions Section

-- | Off-The-Shelf Solutions section.
newtype OffShelfSolnsSec = OffShelfSolnsProg [Contents]

-- ** Values of Auxiliary Constants Section

-- | Values of Auxiliary Constants section.
data AuxConstntSec = AuxConsProg CI [ConstQDef]

-- ** Appendix Section

-- | Appendix section.
newtype AppndxSec = AppndxProg [Contents]

-- * Multiplate Definition and Type

-- | Holds all of the different kinds of sections. Defines as a plate with an applicative functor.
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
}

-- | Holds boilerplate code to make getting sections easier.
instance Multiplate DLPlate where
  multiplate :: forall (f :: * -> *). Applicative f => DLPlate f -> DLPlate f
multiplate DLPlate f
p = (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
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 RefSec -> f RefSec
forall {f :: * -> *}. Applicative f => RefSec -> f RefSec
res IntroSec -> f IntroSec
intro IntroSub -> f IntroSub
forall {f :: * -> *}. Applicative f => IntroSub -> f IntroSub
intro' StkhldrSec -> f StkhldrSec
stk StkhldrSub -> f StkhldrSub
forall {f :: * -> *}. Applicative f => StkhldrSub -> f StkhldrSub
stk' GSDSec -> f GSDSec
gs GSDSub -> f GSDSub
forall {f :: * -> *}. Applicative f => GSDSub -> f GSDSub
gs' SSDSec -> f SSDSec
ss SSDSub -> f SSDSub
ss' ProblemDescription -> f ProblemDescription
pd PDSub -> f PDSub
forall {f :: * -> *}. Applicative f => PDSub -> f PDSub
pd' SCSSub -> f SCSSub
forall {f :: * -> *}. Applicative f => SCSSub -> f SCSSub
sc
    ReqrmntSec -> f ReqrmntSec
rs ReqsSub -> f ReqsSub
forall {f :: * -> *}. Applicative f => ReqsSub -> f ReqsSub
rs' LCsSec -> f LCsSec
forall {f :: * -> *}. Applicative f => LCsSec -> f LCsSec
lcp UCsSec -> f UCsSec
forall {f :: * -> *}. Applicative f => UCsSec -> f UCsSec
ucp TraceabilitySec -> f TraceabilitySec
forall {f :: * -> *}.
Applicative f =>
TraceabilitySec -> f TraceabilitySec
ts OffShelfSolnsSec -> f OffShelfSolnsSec
forall {f :: * -> *}.
Applicative f =>
OffShelfSolnsSec -> f OffShelfSolnsSec
es AuxConstntSec -> f AuxConstntSec
forall {f :: * -> *}.
Applicative f =>
AuxConstntSec -> f AuxConstntSec
acs AppndxSec -> f AppndxSec
forall {f :: * -> *}. Applicative f => AppndxSec -> f AppndxSec
aps where
    ds :: DocSection -> f DocSection
ds DocSection
TableOfContents = DocSection -> f DocSection
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DocSection
TableOfContents
    ds (RefSec RefSec
x) = RefSec -> DocSection
RefSec (RefSec -> DocSection) -> f RefSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> RefSec -> f RefSec
forall (f :: * -> *). DLPlate f -> RefSec -> f RefSec
refSec DLPlate f
p RefSec
x
    ds (IntroSec IntroSec
x) = IntroSec -> DocSection
IntroSec (IntroSec -> DocSection) -> f IntroSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> IntroSec -> f IntroSec
forall (f :: * -> *). DLPlate f -> IntroSec -> f IntroSec
introSec DLPlate f
p IntroSec
x
    ds (StkhldrSec StkhldrSec
x) = StkhldrSec -> DocSection
StkhldrSec (StkhldrSec -> DocSection) -> f StkhldrSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> StkhldrSec -> f StkhldrSec
forall (f :: * -> *). DLPlate f -> StkhldrSec -> f StkhldrSec
stkSec DLPlate f
p StkhldrSec
x
    ds (GSDSec GSDSec
x) = GSDSec -> DocSection
GSDSec (GSDSec -> DocSection) -> f GSDSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> GSDSec -> f GSDSec
forall (f :: * -> *). DLPlate f -> GSDSec -> f GSDSec
gsdSec DLPlate f
p GSDSec
x
    ds (SSDSec SSDSec
x) = SSDSec -> DocSection
SSDSec (SSDSec -> DocSection) -> f SSDSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> SSDSec -> f SSDSec
forall (f :: * -> *). DLPlate f -> SSDSec -> f SSDSec
ssdSec DLPlate f
p SSDSec
x
    ds (ReqrmntSec ReqrmntSec
x) = ReqrmntSec -> DocSection
ReqrmntSec (ReqrmntSec -> DocSection) -> f ReqrmntSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> ReqrmntSec -> f ReqrmntSec
forall (f :: * -> *). DLPlate f -> ReqrmntSec -> f ReqrmntSec
reqSec DLPlate f
p ReqrmntSec
x
    ds (LCsSec LCsSec
x) = LCsSec -> DocSection
LCsSec (LCsSec -> DocSection) -> f LCsSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> LCsSec -> f LCsSec
forall (f :: * -> *). DLPlate f -> LCsSec -> f LCsSec
lcsSec DLPlate f
p LCsSec
x
    ds (UCsSec UCsSec
x) = UCsSec -> DocSection
UCsSec (UCsSec -> DocSection) -> f UCsSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> UCsSec -> f UCsSec
forall (f :: * -> *). DLPlate f -> UCsSec -> f UCsSec
ucsSec DLPlate f
p UCsSec
x
    ds (TraceabilitySec TraceabilitySec
x) = TraceabilitySec -> DocSection
TraceabilitySec (TraceabilitySec -> DocSection)
-> f TraceabilitySec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> TraceabilitySec -> f TraceabilitySec
forall (f :: * -> *).
DLPlate f -> TraceabilitySec -> f TraceabilitySec
traceSec DLPlate f
p TraceabilitySec
x
    ds (OffShelfSolnsSec OffShelfSolnsSec
x) = OffShelfSolnsSec -> DocSection
OffShelfSolnsSec (OffShelfSolnsSec -> DocSection)
-> f OffShelfSolnsSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> OffShelfSolnsSec -> f OffShelfSolnsSec
forall (f :: * -> *).
DLPlate f -> OffShelfSolnsSec -> f OffShelfSolnsSec
offShelfSec DLPlate f
p OffShelfSolnsSec
x
    ds (AuxConstntSec AuxConstntSec
x) = AuxConstntSec -> DocSection
AuxConstntSec (AuxConstntSec -> DocSection) -> f AuxConstntSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> AuxConstntSec -> f AuxConstntSec
forall (f :: * -> *). DLPlate f -> AuxConstntSec -> f AuxConstntSec
auxConsSec DLPlate f
p AuxConstntSec
x
    ds (AppndxSec AppndxSec
x) = AppndxSec -> DocSection
AppndxSec (AppndxSec -> DocSection) -> f AppndxSec -> f DocSection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> AppndxSec -> f AppndxSec
forall (f :: * -> *). DLPlate f -> AppndxSec -> f AppndxSec
appendSec DLPlate f
p AppndxSec
x
    ds DocSection
Bibliography = DocSection -> f DocSection
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DocSection
Bibliography

    res :: RefSec -> f RefSec
res (RefProg Contents
c [RefTab]
x) = RefSec -> f RefSec
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (RefSec -> f RefSec) -> RefSec -> f RefSec
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 ([IntroSub] -> IntroSec) -> f [IntroSub] -> f IntroSec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
      (IntroSub -> f IntroSub) -> [IntroSub] -> f [IntroSub]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (DLPlate f -> IntroSub -> f IntroSub
forall (f :: * -> *). DLPlate f -> IntroSub -> f IntroSub
introSub DLPlate f
p) [IntroSub]
progs
    intro' :: IntroSub -> f IntroSub
intro' (IPurpose [Sentence]
s) = IntroSub -> f IntroSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (IntroSub -> f IntroSub) -> IntroSub -> f IntroSub
forall a b. (a -> b) -> a -> b
$ [Sentence] -> IntroSub
IPurpose [Sentence]
s
    intro' (IScope Sentence
s) = IntroSub -> f IntroSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (IntroSub -> f IntroSub) -> IntroSub -> f IntroSub
forall a b. (a -> b) -> a -> b
$ Sentence -> IntroSub
IScope Sentence
s
    intro' (IChar [Sentence]
s1 [Sentence]
s2 [Sentence]
s3) = IntroSub -> f IntroSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (IntroSub -> f IntroSub) -> IntroSub -> f IntroSub
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) = IntroSub -> f IntroSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (IntroSub -> f IntroSub) -> IntroSub -> f IntroSub
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 ([StkhldrSub] -> StkhldrSec) -> f [StkhldrSub] -> f StkhldrSec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (StkhldrSub -> f StkhldrSub) -> [StkhldrSub] -> f [StkhldrSub]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (DLPlate f -> StkhldrSub -> f StkhldrSub
forall (f :: * -> *). DLPlate f -> StkhldrSub -> f StkhldrSub
stkSub DLPlate f
p) [StkhldrSub]
progs
    stk' :: StkhldrSub -> f StkhldrSub
stk' (Client CI
c Sentence
s) = StkhldrSub -> f StkhldrSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (StkhldrSub -> f StkhldrSub) -> StkhldrSub -> f StkhldrSub
forall a b. (a -> b) -> a -> b
$ CI -> Sentence -> StkhldrSub
Client CI
c Sentence
s
    stk' (Cstmr CI
c) = StkhldrSub -> f StkhldrSub
forall a. a -> f a
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 ([GSDSub] -> GSDSec) -> f [GSDSub] -> f GSDSec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (GSDSub -> f GSDSub) -> [GSDSub] -> f [GSDSub]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (DLPlate f -> GSDSub -> f GSDSub
forall (f :: * -> *). DLPlate f -> GSDSub -> f GSDSub
gsdSub DLPlate f
p) [GSDSub]
x
    gs' :: GSDSub -> f GSDSub
gs' (SysCntxt [Contents]
c) = GSDSub -> f GSDSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GSDSub -> f GSDSub) -> GSDSub -> f GSDSub
forall a b. (a -> b) -> a -> b
$ [Contents] -> GSDSub
SysCntxt [Contents]
c
    gs' (UsrChars [Contents]
c) = GSDSub -> f GSDSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GSDSub -> f GSDSub) -> GSDSub -> f GSDSub
forall a b. (a -> b) -> a -> b
$ [Contents] -> GSDSub
UsrChars [Contents]
c
    gs' (SystCons [Contents]
c [Section]
s) = GSDSub -> f GSDSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GSDSub -> f GSDSub) -> GSDSub -> f GSDSub
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 ([SSDSub] -> SSDSec) -> f [SSDSub] -> f SSDSec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (SSDSub -> f SSDSub) -> [SSDSub] -> f [SSDSub]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (DLPlate f -> SSDSub -> f SSDSub
forall (f :: * -> *). DLPlate f -> SSDSub -> f SSDSub
ssdSub DLPlate f
p) [SSDSub]
progs
    ss' :: SSDSub -> f SSDSub
ss' (SSDProblem ProblemDescription
prog) = ProblemDescription -> SSDSub
SSDProblem (ProblemDescription -> SSDSub) -> f ProblemDescription -> f SSDSub
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DLPlate f -> ProblemDescription -> f ProblemDescription
forall (f :: * -> *).
DLPlate f -> ProblemDescription -> f ProblemDescription
pdSec DLPlate f
p ProblemDescription
prog
    ss' (SSDSolChSpec (SCSProg [SCSSub]
spec)) = SolChSpec -> SSDSub
SSDSolChSpec (SolChSpec -> SSDSub)
-> ([SCSSub] -> SolChSpec) -> [SCSSub] -> SSDSub
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [SCSSub] -> SolChSpec
SCSProg ([SCSSub] -> SSDSub) -> f [SCSSub] -> f SSDSub
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (SCSSub -> f SCSSub) -> [SCSSub] -> f [SCSSub]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (DLPlate f -> SCSSub -> f SCSSub
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 ([PDSub] -> ProblemDescription)
-> f [PDSub] -> f ProblemDescription
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PDSub -> f PDSub) -> [PDSub] -> f [PDSub]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (DLPlate f -> PDSub -> f PDSub
forall (f :: * -> *). DLPlate f -> PDSub -> f PDSub
pdSub DLPlate f
p) [PDSub]
progs
    pd' :: PDSub -> f PDSub
pd' (TermsAndDefs Maybe Sentence
s [c]
cs) = PDSub -> f PDSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PDSub -> f PDSub) -> PDSub -> f PDSub
forall a b. (a -> b) -> a -> b
$ Maybe Sentence -> [c] -> PDSub
forall c. Concept c => Maybe Sentence -> [c] -> PDSub
TermsAndDefs Maybe Sentence
s [c]
cs
    pd' (Goals [Sentence]
s [ConceptInstance]
ci) = PDSub -> f PDSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PDSub -> f PDSub) -> PDSub -> f PDSub
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) = PDSub -> f PDSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PDSub -> f PDSub) -> PDSub -> f PDSub
forall a b. (a -> b) -> a -> b
$ a -> [Sentence] -> LabelledContent -> [Contents] -> PDSub
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) = SCSSub -> f SCSSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ([ConceptInstance] -> SCSSub
Assumptions [ConceptInstance]
c)
    sc (TMs [Sentence]
s Fields
f [TheoryModel]
t) = SCSSub -> f SCSSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SCSSub -> f SCSSub) -> SCSSub -> f SCSSub
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) = SCSSub -> f SCSSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SCSSub -> f SCSSub) -> SCSSub -> f SCSSub
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) = SCSSub -> f SCSSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SCSSub -> f SCSSub) -> SCSSub -> f SCSSub
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) = SCSSub -> f SCSSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SCSSub -> f SCSSub) -> SCSSub -> f SCSSub
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) = SCSSub -> f SCSSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SCSSub -> f SCSSub) -> SCSSub -> f SCSSub
forall a b. (a -> b) -> a -> b
$ Sentence -> [c] -> SCSSub
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) = SCSSub -> f SCSSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SCSSub -> f SCSSub) -> SCSSub -> f SCSSub
forall a b. (a -> b) -> a -> b
$ [c] -> [Contents] -> SCSSub
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 ([ReqsSub] -> ReqrmntSec) -> f [ReqsSub] -> f ReqrmntSec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ReqsSub -> f ReqsSub) -> [ReqsSub] -> f [ReqsSub]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (DLPlate f -> ReqsSub -> f ReqsSub
forall (f :: * -> *). DLPlate f -> ReqsSub -> f ReqsSub
reqSub DLPlate f
p) [ReqsSub]
reqs
    rs' :: ReqsSub -> f ReqsSub
rs' (FReqsSub [ConceptInstance]
ci [LabelledContent]
con) = ReqsSub -> f ReqsSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ReqsSub -> f ReqsSub) -> ReqsSub -> f ReqsSub
forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> [LabelledContent] -> ReqsSub
FReqsSub [ConceptInstance]
ci [LabelledContent]
con
    rs' (FReqsSub' [ConceptInstance]
ci [LabelledContent]
con) = ReqsSub -> f ReqsSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ReqsSub -> f ReqsSub) -> ReqsSub -> f ReqsSub
forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> [LabelledContent] -> ReqsSub
FReqsSub' [ConceptInstance]
ci [LabelledContent]
con
    rs' (NonFReqsSub [ConceptInstance]
c) = ReqsSub -> f ReqsSub
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ReqsSub -> f ReqsSub) -> ReqsSub -> f ReqsSub
forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> ReqsSub
NonFReqsSub [ConceptInstance]
c
    lcp :: LCsSec -> f LCsSec
lcp (LCsProg [ConceptInstance]
c) = LCsSec -> f LCsSec
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (LCsSec -> f LCsSec) -> LCsSec -> f LCsSec
forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> LCsSec
LCsProg [ConceptInstance]
c
    ucp :: UCsSec -> f UCsSec
ucp (UCsProg [ConceptInstance]
c) = UCsSec -> f UCsSec
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (UCsSec -> f UCsSec) -> UCsSec -> f UCsSec
forall a b. (a -> b) -> a -> b
$ [ConceptInstance] -> UCsSec
UCsProg [ConceptInstance]
c
    ts :: TraceabilitySec -> f TraceabilitySec
ts (TraceabilityProg [TraceConfig]
progs) = TraceabilitySec -> f TraceabilitySec
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (TraceabilitySec -> f TraceabilitySec)
-> TraceabilitySec -> f TraceabilitySec
forall a b. (a -> b) -> a -> b
$ [TraceConfig] -> TraceabilitySec
TraceabilityProg [TraceConfig]
progs
    es :: OffShelfSolnsSec -> f OffShelfSolnsSec
es (OffShelfSolnsProg [Contents]
contents) = OffShelfSolnsSec -> f OffShelfSolnsSec
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (OffShelfSolnsSec -> f OffShelfSolnsSec)
-> OffShelfSolnsSec -> f OffShelfSolnsSec
forall a b. (a -> b) -> a -> b
$ [Contents] -> OffShelfSolnsSec
OffShelfSolnsProg [Contents]
contents
    acs :: AuxConstntSec -> f AuxConstntSec
acs (AuxConsProg CI
ci [ConstQDef]
qdef) = AuxConstntSec -> f AuxConstntSec
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AuxConstntSec -> f AuxConstntSec)
-> AuxConstntSec -> f AuxConstntSec
forall a b. (a -> b) -> a -> b
$ CI -> [ConstQDef] -> AuxConstntSec
AuxConsProg CI
ci [ConstQDef]
qdef
    aps :: AppndxSec -> f AppndxSec
aps (AppndxProg [Contents]
con) = AppndxSec -> f AppndxSec
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AppndxSec -> f AppndxSec) -> AppndxSec -> f AppndxSec
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 = (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
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 (f :: * -> *). DLPlate f -> DocSection -> f DocSection)
-> DocSection -> f DocSection
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> DocSection -> f DocSection
forall (f :: * -> *). DLPlate f -> DocSection -> f DocSection
docSec) ((forall (f :: * -> *). DLPlate f -> RefSec -> f RefSec)
-> RefSec -> f RefSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> RefSec -> f RefSec
forall (f :: * -> *). DLPlate f -> RefSec -> f RefSec
refSec) ((forall (f :: * -> *). DLPlate f -> IntroSec -> f IntroSec)
-> IntroSec -> f IntroSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> IntroSec -> f IntroSec
forall (f :: * -> *). DLPlate f -> IntroSec -> f IntroSec
introSec) ((forall (f :: * -> *). DLPlate f -> IntroSub -> f IntroSub)
-> IntroSub -> f IntroSub
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> IntroSub -> f IntroSub
forall (f :: * -> *). DLPlate f -> IntroSub -> f IntroSub
introSub) ((forall (f :: * -> *). DLPlate f -> StkhldrSec -> f StkhldrSec)
-> StkhldrSec -> f StkhldrSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> StkhldrSec -> f StkhldrSec
forall (f :: * -> *). DLPlate f -> StkhldrSec -> f StkhldrSec
stkSec)
    ((forall (f :: * -> *). DLPlate f -> StkhldrSub -> f StkhldrSub)
-> StkhldrSub -> f StkhldrSub
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> StkhldrSub -> f StkhldrSub
forall (f :: * -> *). DLPlate f -> StkhldrSub -> f StkhldrSub
stkSub) ((forall (f :: * -> *). DLPlate f -> GSDSec -> f GSDSec)
-> GSDSec -> f GSDSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> GSDSec -> f GSDSec
forall (f :: * -> *). DLPlate f -> GSDSec -> f GSDSec
gsdSec) ((forall (f :: * -> *). DLPlate f -> GSDSub -> f GSDSub)
-> GSDSub -> f GSDSub
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> GSDSub -> f GSDSub
forall (f :: * -> *). DLPlate f -> GSDSub -> f GSDSub
gsdSub) ((forall (f :: * -> *). DLPlate f -> SSDSec -> f SSDSec)
-> SSDSec -> f SSDSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> SSDSec -> f SSDSec
forall (f :: * -> *). DLPlate f -> SSDSec -> f SSDSec
ssdSec) ((forall (f :: * -> *). DLPlate f -> SSDSub -> f SSDSub)
-> SSDSub -> f SSDSub
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> SSDSub -> f SSDSub
forall (f :: * -> *). DLPlate f -> SSDSub -> f SSDSub
ssdSub) ((forall (f :: * -> *).
 DLPlate f -> ProblemDescription -> f ProblemDescription)
-> ProblemDescription -> f ProblemDescription
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> ProblemDescription -> f ProblemDescription
forall (f :: * -> *).
DLPlate f -> ProblemDescription -> f ProblemDescription
pdSec) ((forall (f :: * -> *). DLPlate f -> PDSub -> f PDSub)
-> PDSub -> f PDSub
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> PDSub -> f PDSub
forall (f :: * -> *). DLPlate f -> PDSub -> f PDSub
pdSub)
    ((forall (f :: * -> *). DLPlate f -> SCSSub -> f SCSSub)
-> SCSSub -> f SCSSub
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> SCSSub -> f SCSSub
forall (f :: * -> *). DLPlate f -> SCSSub -> f SCSSub
scsSub) ((forall (f :: * -> *). DLPlate f -> ReqrmntSec -> f ReqrmntSec)
-> ReqrmntSec -> f ReqrmntSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> ReqrmntSec -> f ReqrmntSec
forall (f :: * -> *). DLPlate f -> ReqrmntSec -> f ReqrmntSec
reqSec) ((forall (f :: * -> *). DLPlate f -> ReqsSub -> f ReqsSub)
-> ReqsSub -> f ReqsSub
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> ReqsSub -> f ReqsSub
forall (f :: * -> *). DLPlate f -> ReqsSub -> f ReqsSub
reqSub) ((forall (f :: * -> *). DLPlate f -> LCsSec -> f LCsSec)
-> LCsSec -> f LCsSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> LCsSec -> f LCsSec
forall (f :: * -> *). DLPlate f -> LCsSec -> f LCsSec
lcsSec) ((forall (f :: * -> *). DLPlate f -> UCsSec -> f UCsSec)
-> UCsSec -> f UCsSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> UCsSec -> f UCsSec
forall (f :: * -> *). DLPlate f -> UCsSec -> f UCsSec
ucsSec)
    ((forall (f :: * -> *).
 DLPlate f -> TraceabilitySec -> f TraceabilitySec)
-> TraceabilitySec -> f TraceabilitySec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> TraceabilitySec -> f TraceabilitySec
forall (f :: * -> *).
DLPlate f -> TraceabilitySec -> f TraceabilitySec
traceSec) ((forall (f :: * -> *).
 DLPlate f -> OffShelfSolnsSec -> f OffShelfSolnsSec)
-> OffShelfSolnsSec -> f OffShelfSolnsSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> OffShelfSolnsSec -> f OffShelfSolnsSec
forall (f :: * -> *).
DLPlate f -> OffShelfSolnsSec -> f OffShelfSolnsSec
offShelfSec) ((forall (f :: * -> *).
 DLPlate f -> AuxConstntSec -> f AuxConstntSec)
-> AuxConstntSec -> f AuxConstntSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> AuxConstntSec -> f AuxConstntSec
forall (f :: * -> *). DLPlate f -> AuxConstntSec -> f AuxConstntSec
auxConsSec) ((forall (f :: * -> *). DLPlate f -> AppndxSec -> f AppndxSec)
-> AppndxSec -> f AppndxSec
forall a. Projector DLPlate a -> a -> f a
b DLPlate f -> AppndxSec -> f AppndxSec
forall (f :: * -> *). DLPlate f -> AppndxSec -> f AppndxSec
appendSec)