drasil-theory-0.1.0.0: A framework for code and document generation for scientific software - Theory SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Theory.Drasil.Components.Derivation

Description

For deriving equations in examples.

Synopsis

Types

data Derivation Source #

Derivations are an ordered list of sentences and expressions. They are rendered in order as paragraphs and equation blocks to display the derivation.

Constructors

Derivation Sentence [Sentence] 

Instances

Instances details
Generic Derivation Source # 
Instance details

Defined in Theory.Drasil.Components.Derivation

Associated Types

type Rep Derivation :: Type -> Type #

HasChunkRefs Derivation Source # 
Instance details

Defined in Theory.Drasil.Components.Derivation

type Rep Derivation Source # 
Instance details

Defined in Theory.Drasil.Components.Derivation

type Rep Derivation = D1 ('MetaData "Derivation" "Theory.Drasil.Components.Derivation" "drasil-theory-0.1.0.0-8nwImNo9J1BAfyZdVWlsyU" 'False) (C1 ('MetaCons "Derivation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Sentence) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Sentence])))

Typeclasses

class MayHaveDerivation c where Source #

A class that might have a Derivation.

Methods

derivations :: Lens' c (Maybe Derivation) Source #

Provides a Lens to a possible derivation.

Instances

Instances details
MayHaveDerivation DataDefinition Source #

Finds the derivation of the 'DataDefinition where'. May contain Nothing.

Instance details

Defined in Theory.Drasil.DataDefinition

MayHaveDerivation GenDefn Source #

Finds the derivation of the GenDefn. May contain Nothing.

Instance details

Defined in Theory.Drasil.GenDefn

MayHaveDerivation InstanceModel Source #

Finds the derivation of the InstanceModel. May contain Nothing.

Instance details

Defined in Theory.Drasil.InstanceModel

Constructors

mkDeriv :: Sentence -> [Sentence] -> Derivation Source #

Smart constructor for creating a Derivation.

mkDerivName :: Sentence -> [Sentence] -> Derivation Source #

Similar to mkDeriv, but prepends "Detailed derivation of" to the header.

mkDerivNoHeader :: [Sentence] -> Derivation Source #

Similar to mkDeriv, but without a header Sentence.