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.Concept.NamedCombinators

Description

Defines various chunk combinators. The full naming scheme can be found in the Wiki. For convenience, here is a summary:

  • Combinators that conflict with haskell-native functions have an underscore appended.
  • Default plural case for combinators will be first term singular, second term plural.
  • P and S denote the plural case of the combinator when it does not follow the above default.
  • Gen denotes the general function case.
  • Although this should eventually be phased out, T denotes a combinator meant for use with titles.
  • NI and NP denote whether something must be a part of the NamedIdea or NounPhrase class.
Synopsis

Prepositions

"The" Combinators

the :: NamedIdea t => t -> NP Source #

Prepends "the" to a NamedIdea.

theGen :: (t -> Sentence) -> t -> NP Source #

A customizable version of the. The given function is applied to both singular and plural cases.

"A" Combinators

a_ :: NamedIdea c => c -> NP Source #

Prepends "a" to a NamedIdea (similar to the).

a_Gen :: (c -> Sentence) -> c -> NP Source #

Customizable version of a.

Conjunctions

"And" Combinators

and_ :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "and" between their terms. Plural case is (phrase t1) "and" (plural t2).

and_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "and" between their terms. Plural case is (plural t1) "and" (phrase t2).

and_PP :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "and" between their terms. Plural case is (plural t1) "and" (plural t2).

and_TGen :: (NamedIdea c, NamedIdea d) => (c -> Sentence) -> (d -> Sentence) -> c -> d -> NP Source #

Customizable and_ combinator (takes two title case capitalization rules and two NamedIdeas).

and_Gen :: (c -> Sentence) -> (d -> Sentence) -> c -> d -> NP Source #

Customizable and_ combinator. Both plural and singular cases are dermined by the two given functions

andIts :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "and its" between their terms. Plural case is (phrase t1) "and its" (plural t2).

andThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "and the" between their terms. Plural case is (phrase t1) "and the" (plural t2).

"Of" Combinators

of_ :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "of" between their terms. Plural case is (phrase t1) "of" (plural t2).

of_NINP :: (NamedIdea c, NounPhrase d) => c -> d -> NP Source #

Same as of_ but second argument is a NounPhrase.

of_PSNPNI :: (NounPhrase c, NamedIdea d) => c -> d -> NP Source #

Same as of_ but first argument is a NounPhrase and plural case is (plural t1) "of" (phrase t2).

of_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as of_, except plural case is (plural t1) "of" (phrase t2).

ofA :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as of_PS, except combining Sentence piece is "of a".

ofAPS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as ofA, except phrase case is (plural t1) "of a" (phrase t2).

ofThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as of_, except combining Sentence piece is "of the". Plural case is (phrase t1) ofThe (plural t2).

ofThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as ofThe, except plural case is (plural t1) ofThe (phrase t2).

"The" Combinators

the_ofThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as ofThe, except prepends "the".

the_ofThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as the_ofThe, except plural case is (plural t1) the_ofThe (phrase t2)

onThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as of_, except combining Sentence piece is "on the".

onThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as onThe, except plural case is (plural t1) S.onThe (phrase t2)

onThePP :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as onThe, except plural case is (plural t1) S.onThe (plural t2)

inThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "in the" between their terms. Plural case is (phrase t1) "in the" (plural t2).

inThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "in the" between their terms. Plural case is (plural t1) "in the" (phrase t2).

inThePP :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "in the" between their terms. Plural case is (plural t1) "in the" (plural t2).

isThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "is the" between their terms. Plural case is (phrase t1) "is the" (plural t2).

toThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "to the" between their terms. Plural case is (phrase t1) "to the" (plural t2).

"For" Combinators

for :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "for" between their terms. Plural case is (phrase t1) "for" (plural t2).

forTGen :: (NamedIdea c, Idea d) => (c -> Sentence) -> (d -> Sentence) -> c -> d -> NP Source #

Similar to for, but takes two functions that determine the titleCase.

"In" Combinators

in_ :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "in" between their terms. Plural case is (phrase t1) "in" (plural t2).

in_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as in_, except plural case is (plural t1) "in" (phrase t2).

inA :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "in a" between their terms. Plural case is (phrase t1) "in a" (plural t2).

Other Combinators

is :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "is" between their terms. Plural case is (phrase t1) "is" (plural t2).

with :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Case with "T1s with T2", as opposed to "T1 with T2", i.e. singular case is (plural t1) "with" (phrase t2) while the plural case pluralizes the first.

Direct Term Combinators

Some are specific to IdeaDicts.

compoundNC :: (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict Source #

Combinator for combining two NamedIdeass into a IdeaDict. Plural case only makes second term plural. See compoundPhrase for more on plural behaviour. Does not preserve abbreviations.

compoundNCPP :: (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict Source #

Similar to compoundNC but both terms are pluralized for plural case.

compoundNCGen :: (NamedIdea a, NamedIdea b) => (NP -> Sentence) -> (NP -> Sentence) -> a -> b -> IdeaDict Source #

Similar to compoundNC, except plural cases are customizable.

compoundNCPS :: IdeaDict -> IdeaDict -> IdeaDict Source #

Similar to compoundNC, except for plural case, where first parameter gets pluralized while second one stays singular.

compoundNCPSPP :: IdeaDict -> IdeaDict -> IdeaDict Source #

Similar to compoundNCGenP but sets first parameter function to plural.

compoundNCGenP :: (NamedIdea a, NamedIdea b) => (NP -> Sentence) -> a -> b -> IdeaDict Source #

Similar to compoundNC, but takes a function that is applied to the first term (eg. short or plural).

combineNINP :: NamedIdea c => c -> NP -> NP Source #

Helper function that combines a NamedIdea and a NP without any words in between. Plural case is (phrase t1) +:+ (pluralNP t2).

combineNPNI :: NamedIdea c => NP -> c -> NP Source #

Similar to combineNINP but takes in a NP first and a NamedIdea second.

combineNINI :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Similar to combineNINP but takes two NamedIdeas.