module Language.Drasil.Derivation where
import Language.Drasil.Sentence (Sentence(EmptyS, S), (+:))
import Control.Lens (Lens')
data Derivation = Derivation Sentence [Sentence]
class MayHaveDerivation c where
derivations :: Lens' c (Maybe Derivation)
mkDeriv :: Sentence -> [Sentence] -> Derivation
mkDeriv :: Sentence -> [Sentence] -> Derivation
mkDeriv = Sentence -> [Sentence] -> Derivation
Derivation
mkDerivName :: Sentence -> [Sentence] -> Derivation
mkDerivName :: Sentence -> [Sentence] -> Derivation
mkDerivName Sentence
s = Sentence -> [Sentence] -> Derivation
Derivation (String -> Sentence
S String
"Detailed derivation of" Sentence -> Sentence -> Sentence
+: Sentence
s)
mkDerivNoHeader :: [Sentence] -> Derivation
= Sentence -> [Sentence] -> Derivation
Derivation Sentence
EmptyS