| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Theory.Drasil.Components.Derivation
Contents
Description
For deriving equations in examples.
Synopsis
- data Derivation = Derivation Sentence [Sentence]
- class MayHaveDerivation c where
- derivations :: Lens' c (Maybe Derivation)
- mkDeriv :: Sentence -> [Sentence] -> Derivation
- mkDerivName :: Sentence -> [Sentence] -> Derivation
- mkDerivNoHeader :: [Sentence] -> Derivation
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
| Generic Derivation Source # | |
Defined in Theory.Drasil.Components.Derivation Associated Types type Rep Derivation :: Type -> Type # | |
| HasChunkRefs Derivation Source # | |
Defined in Theory.Drasil.Components.Derivation Methods chunkRefs :: Derivation -> Set UID # | |
| type Rep Derivation Source # | |
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.
Instances
| MayHaveDerivation DataDefinition Source # | Finds the derivation of the 'DataDefinition where'. May contain Nothing. |
Defined in Theory.Drasil.DataDefinition Methods derivations :: Lens' DataDefinition (Maybe Derivation) Source # | |
| MayHaveDerivation GenDefn Source # | Finds the derivation of the |
Defined in Theory.Drasil.GenDefn Methods derivations :: Lens' GenDefn (Maybe Derivation) Source # | |
| MayHaveDerivation InstanceModel Source # | Finds the derivation of the |
Defined in Theory.Drasil.InstanceModel Methods derivations :: Lens' InstanceModel (Maybe Derivation) Source # | |
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 #