citeproc-hs-0.3.9: A Citation Style Language implementation in Haskell

Portabilityunportable
Stabilityunstable
MaintainerAndrea Rossato <andrea.rossato@unitn.it>
Safe HaskellNone

Text.CSL.Eval.Common

Description

The CSL implementation

Synopsis

Documentation

data EvalState Source

Constructors

EvalState 

Instances

data Environment Source

Constructors

Env 

Fields

cite :: Cite
 
terms :: [CslTerm]
 
macros :: [MacroMap]
 
dates :: [Element]
 
options :: [Option]
 
names :: [Element]
 
abbrevs :: [Abbrev]
 

Instances

getAbbreviation :: [Abbrev] -> String -> String -> StringSource

With the variable name and the variable value search for an abbreviation or return an empty string.

getTerm :: Bool -> Form -> String -> State EvalState StringSource

If the first parameter is True the plural form will be retrieved.

getVar :: a -> (Value -> a) -> String -> State EvalState aSource

formatVariable :: String -> StringSource

Convert variable to lower case, translating underscores (_) to dashes (-)

consuming :: State EvalState a -> State EvalState aSource

when' :: Monad m => m Bool -> m [a] -> m [a]Source

whenElse :: Monad m => m Bool -> m a -> m a -> m aSource

concatMapM :: (Monad m, Functor m, Eq b) => (a -> m [b]) -> [a] -> m [b]Source