Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
Type
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.
Class
class MayHaveDerivation c where Source #
A class that might have a Derivation
.
derivations :: Lens' c (Maybe Derivation) Source #
Provides a Lens
to a possible derivation.
Functions
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 #