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

Language.Drasil.Sentence.Generators

Description

Functions that create sentences from other data

Synopsis

Documentation

fromSource :: (Referable r, HasShortName r) => r -> Sentence Source #

Wraps "from reference" in parentheses.

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

Apply a binary function to the terms of two named ideas, instead of to the named ideas themselves. Ex. fterms compoundPhrase t1 t2 instead of compoundPhrase (t1 ^. term) (t2 ^. term).

getTandS :: Quantity a => a -> Sentence Source #

Used when you want to say a term followed by its symbol. ex. "...using the Force F in...".

checkValidStr :: String -> String -> Either String String Source #

Uses an Either type to check if a String is valid - Left with error message if there is an invalid Char in String, else Right with String.