module Drasil.DocumentLanguage.Notebook.LsnDecl where
import qualified Drasil.DocumentLanguage.Notebook.Core as NB (LsnDesc, LsnChapter(..),
Intro(..), LearnObj(..), Review(..), CaseProb(..), Example(..), Smmry(..), Apndx(..))
import SysInfo.Drasil (SystemInformation)
type LsnDecl = [LsnChapter]
data LsnChapter = Intro NB.Intro
| LearnObj NB.LearnObj
| Review NB.Review
| CaseProb NB.CaseProb
| Example NB.Example
| Smmry NB.Smmry
| BibSec
| Apndx NB.Apndx
mkLsnDesc :: SystemInformation -> LsnDecl -> NB.LsnDesc
mkLsnDesc :: SystemInformation -> LsnDecl -> LsnDesc
mkLsnDesc SystemInformation
_ = (LsnChapter -> LsnChapter) -> LsnDecl -> LsnDesc
forall a b. (a -> b) -> [a] -> [b]
map LsnChapter -> LsnChapter
sec where
sec :: LsnChapter -> NB.LsnChapter
sec :: LsnChapter -> LsnChapter
sec (Intro Intro
i) = Intro -> LsnChapter
NB.Intro Intro
i
sec (LearnObj LearnObj
lo) = LearnObj -> LsnChapter
NB.LearnObj LearnObj
lo
sec (Review Review
r) = Review -> LsnChapter
NB.Review Review
r
sec (CaseProb CaseProb
cp) = CaseProb -> LsnChapter
NB.CaseProb CaseProb
cp
sec (Example Example
e) = Example -> LsnChapter
NB.Example Example
e
sec (Smmry Smmry
s) = Smmry -> LsnChapter
NB.Smmry Smmry
s
sec LsnChapter
BibSec = LsnChapter
NB.BibSec
sec (Apndx Apndx
a) = Apndx -> LsnChapter
NB.Apndx Apndx
a