drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Chunk.CommonIdea

Description

Contains the common idea type and respective constructors.

Synopsis

Common Idea datatype

data CI Source #

The common idea (with NounPhrase) data type. It must have a UID, NounPhrase for its term, an abbreviation (String), and a domain ([UID]). It is similar to IdeaDict and IdeaDict in the sense that these are for things worth naming, but this type also carries an abbreviation and related domains of knowledge.

Ex. The term "Operating System" has the abbreviation OS and comes from the domain of computer science.

Instances

Instances details
Idea CI Source #

Finds the idea of a CI (abbreviation).

Instance details

Defined in Language.Drasil.Chunk.CommonIdea

Methods

getA :: CI -> Maybe String Source #

NamedIdea CI Source #

Finds term (NP) of the IdeaDict used to make the CI.

Instance details

Defined in Language.Drasil.Chunk.CommonIdea

Methods

term :: Lens' CI NP Source #

CommonIdea CI Source #

Finds the idea of a CI (abbreviation).

Instance details

Defined in Language.Drasil.Chunk.CommonIdea

Methods

abrv :: CI -> String Source #

ConceptDomain CI Source #

Finds the domain of a CI.

Instance details

Defined in Language.Drasil.Chunk.CommonIdea

Methods

cdom :: CI -> [UID] Source #

HasUID CI Source #

Finds UID of the IdeaDict used to make the CI.

Instance details

Defined in Language.Drasil.Chunk.CommonIdea

Methods

uid :: Lens' CI UID Source #

Constructors

commonIdea :: String -> NP -> String -> [UID] -> CI Source #

The commonIdea smart constructor requires a chunk id (String), a term (NP), an abbreviation (String), and a domain ([UID]).

commonIdeaWithDict :: String -> NP -> String -> [IdeaDict] -> CI Source #

Similar to commonIdea, but takes a list of IdeaDict (often a domain).

Functions

getAcc :: CI -> Sentence Source #

Get abbreviation in Sentence form from a CI.

prependAbrv :: CommonIdea c => c -> String -> String Source #

Prepends the abbreviation from a CommonIdea to a String.