| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.Classes
Description
Defining all the classes which represent knowledge-about-knowledge.
Synopsis
- class HasUID c => NamedIdea c where
- class NamedIdea c => Idea c where
- class NamedIdea c => CommonIdea c where
- type Concept c = (Idea c, Definition c, ConceptDomain c)
- class Definition c where
- class ConceptDomain c where
- class (Idea c, HasSpace c, HasSymbol c) => Quantity c
- class HasUnitSymbol u where
- class HasReasVal c where
- class Constrained c where
- constraints :: Lens' c [ConstraintE]
- class HasAdditionalNotes c where
- class (Idea u, Definition u, HasUnitSymbol u) => IsUnit u where
- class UnitEq u where
- class Express c where
- class DefiningExpr c where
- defnExpr :: Lens' (c e) e
Classes
Chunks
class HasUID c => NamedIdea c where Source #
Instances
class NamedIdea c => Idea c where Source #
An Idea is the combination of a NamedIdea and a CommonIdea.
In other words, it may have an acronym/abbreviation.
Instances
class NamedIdea c => CommonIdea c where Source #
CommonIdea is a NamedIdea with the additional
constraint that it must have an abbreviation. This is the main
distinction between getA and abrv, where getA may return Nothing,
while abrv will always return the abbreviation.
type Concept c = (Idea c, Definition c, ConceptDomain c) Source #
Concepts are Ideas with definitions and domains.
class Definition c where Source #
Defines a chunk.
Instances
class ConceptDomain c where Source #
Some concepts have a domain (related information encoded in UIDs to other chunks).
Methods
Provides Getter for the concept domain tags for a chunk
cdom should be exported for use by the Drasil framework, but should not be exported beyond that.
Instances
class (Idea c, HasSpace c, HasSymbol c) => Quantity c Source #
A Quantity is an Idea with a Space and a Symbol.
In theory, it should also restrict to being a part of MayHaveUnit, but that causes
all sorts of import cycles (or lots of orphans).
Instances
| Quantity CodeChunk Source # | |
Defined in Drasil.Code.CodeVar | |
| Quantity CodeFuncChunk Source # |
|
Defined in Drasil.Code.CodeVar | |
| Quantity CodeVarChunk Source # |
|
Defined in Drasil.Code.CodeVar | |
| Quantity ConstrConcept Source # |
|
Defined in Language.Drasil.Chunk.Constrained | |
| Quantity DefinedQuantityDict Source # |
|
Defined in Language.Drasil.Chunk.DefinedQuantity | |
| Quantity UncertQ Source # | |
Defined in Language.Drasil.Chunk.UncertainQuantity | |
| Quantity UnitalChunk Source # |
|
Defined in Language.Drasil.Chunk.Unital | |
| Quantity (QDefinition e) Source # | |
Defined in Language.Drasil.Chunk.Eq | |
class HasUnitSymbol u where Source #
Some chunks store a unit symbol.
Instances
| HasUnitSymbol UnitDefn Source # | Finds unit symbol of the |
class HasReasVal c where Source #
A Quantity that could have a reasonable value.
Instances
| HasReasVal ConstrConcept Source # | Finds a reasonable value for the |
Defined in Language.Drasil.Chunk.Constrained | |
| HasReasVal UncertQ Source # | Finds a reasonable value for the |
class Constrained c where Source #
The Constrained class is a Quantity that has value constraints.
It does not enforce Quantity at this point.
Instances
| Constrained ConstrConcept Source # | Finds the |
Defined in Language.Drasil.Chunk.Constrained Methods constraints :: Lens' ConstrConcept [ConstraintE] Source # | |
| Constrained UncertQ Source # | Finds the |
Defined in Language.Drasil.Chunk.UncertainQuantity Methods constraints :: Lens' UncertQ [ConstraintE] Source # | |
class HasAdditionalNotes c where Source #
Records any additional notes needed to avoid losing information
class (Idea u, Definition u, HasUnitSymbol u) => IsUnit u where Source #
Units are Ideas with a Definition which store a unit symbol.
They must also be explicitly declared to be instances of IsUnit.
Contains a UDefn
Expr and expressions
class Express c where Source #
Data that can be expressed using ModelExpr.
Instances
class DefiningExpr c where Source #
Methods
defnExpr :: Lens' (c e) e Source #
Provides a Lens to the expression.
TODO: Well, technically, e doesn't need to be an "expression" of any sorts.
It just needs to be _something_, and it would have approximately have same meaning.
Instances
| DefiningExpr QDefinition Source # | |
Defined in Language.Drasil.Chunk.Eq Methods defnExpr :: Lens' (QDefinition e) e Source # | |