Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 HasSymbol c => Callable c
- class HasSymbol c => IsArgumentName c
- 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.
type Concept c = (Idea c, Definition c, ConceptDomain c) Source #
Concepts are Idea
s 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 UID
s to other chunks).
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
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 ConstrainedChunk Source # | Finds a reasonable value for the |
Defined in Language.Drasil.Chunk.Constrained | |
HasReasVal UncertQ Source # | Finds a reasonable value for the |
HasReasVal UncertainChunk Source # | Finds a reasonable value for the |
Defined in Language.Drasil.Chunk.UncertainQuantity |
class Constrained c where Source #
The Constrained class is a Quantity
that has value constraints.
It does not enforce Quantity
at this point.
constraints :: Lens' c [ConstraintE] Source #
Provides a Lens
to the Constraint
s.
Instances
Constrained ConstrConcept Source # | Finds the |
Defined in Language.Drasil.Chunk.Constrained constraints :: Lens' ConstrConcept [ConstraintE] Source # | |
Constrained ConstrainedChunk Source # | Finds the |
Defined in Language.Drasil.Chunk.Constrained constraints :: Lens' ConstrainedChunk [ConstraintE] Source # | |
Constrained UncertQ Source # | Finds the |
Defined in Language.Drasil.Chunk.UncertainQuantity constraints :: Lens' UncertQ [ConstraintE] Source # | |
Constrained UncertainChunk Source # | Finds the |
Defined in Language.Drasil.Chunk.UncertainQuantity constraints :: Lens' UncertainChunk [ConstraintE] Source # |
class HasSymbol c => Callable c Source #
Some chunks can be called like functions.
Instances
Callable CodeFuncChunk Source # | Functions are Callable. |
Defined in Language.Drasil.Chunk.CodeVar |
class HasSymbol c => IsArgumentName c Source #
Members must have a named argument.
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 Idea
s 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 #
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 defnExpr :: Lens' (QDefinition e) e Source # |