citeproc-hs-0.2: A Citation Style Language implementation in HaskellSource codeContentsIndex
Text.CSL.Eval
Portabilityunportable
Stabilityunstable
MaintainerAndrea Rossato <andrea.rossato@unitn.it>
Description
The CSL implementation
Synopsis
data EvalState = EvalState {
ref :: ReferenceMap
pos :: String
env :: Environment
debug :: [String]
disamb :: Bool
consume :: Bool
}
data Environment = Env {
terms :: [TermMap]
macros :: [MacroMap]
options :: [Option]
name :: [Name]
}
evalLayout :: Layout -> Bool -> [TermMap] -> [MacroMap] -> [Option] -> String -> Reference -> [Output]
evalSorting :: [TermMap] -> [MacroMap] -> [Option] -> [Sort] -> Reference -> [Sorting]
evalElements :: [Element] -> State EvalState [Output]
evalElement :: Element -> State EvalState [Output]
evalIfThen :: IfThen -> [IfThen] -> [Element] -> State EvalState [Output]
evalNames :: [String] -> [Name] -> String -> State EvalState [Output]
evalDate :: [DatePart] -> [String] -> State EvalState [Output]
getTerm :: Bool -> Form -> String -> State EvalState String
getStringVar :: String -> State EvalState String
getDateVar :: String -> State EvalState [RefDate]
getLocVar :: String -> State EvalState (String, String)
getVar :: a -> (Value -> a) -> String -> State EvalState a
getAgents :: String -> State EvalState [Agent]
getFormattedValue :: String -> Form -> Formatting -> Value -> [Output]
getStringValue :: Value -> String
getOptionVal :: String -> [Option] -> String
isOptionSet :: String -> [Option] -> Bool
isVarSet :: String -> State EvalState Bool
withRefMap :: (ReferenceMap -> a) -> State EvalState a
formatNames :: Bool -> String -> [Agent] -> Name -> State EvalState [Output]
formatName :: Bool -> Form -> Formatting -> NameFormatting -> Agent -> [Output]
formatLabel :: Form -> Formatting -> Bool -> Bool -> String -> State EvalState [Output]
formatDate :: String -> [TermMap] -> [DatePart] -> [RefDate] -> [Output]
output :: Formatting -> String -> [Output]
appendOutput :: Formatting -> [Output] -> [Output]
outputList :: Formatting -> Delimiter -> [Output] -> [Output]
cleanOutput :: [Output] -> [Output]
addDelim :: String -> [Output] -> [Output]
consumeVariable :: String -> State EvalState ()
consuming :: State EvalState a -> State EvalState a
when' :: Monad m => m Bool -> m [a] -> m [a]
whenElse :: Monad m => m Bool -> m a -> m a -> m a
concatMapM :: (Monad m, Functor m, Eq b) => (a -> m [b]) -> [a] -> m [b]
formatVariable :: String -> String
head' :: [a] -> [a]
trace :: String -> State EvalState ()
Documentation
data EvalState Source
Constructors
EvalState
ref :: ReferenceMap
pos :: String
env :: Environment
debug :: [String]
disamb :: Bool
consume :: Bool
data Environment Source
Constructors
Env
terms :: [TermMap]
macros :: [MacroMap]
options :: [Option]
name :: [Name]
show/hide Instances
evalLayout :: Layout -> Bool -> [TermMap] -> [MacroMap] -> [Option] -> String -> Reference -> [Output]Source
evalSorting :: [TermMap] -> [MacroMap] -> [Option] -> [Sort] -> Reference -> [Sorting]Source
evalElements :: [Element] -> State EvalState [Output]Source
evalElement :: Element -> State EvalState [Output]Source
evalIfThen :: IfThen -> [IfThen] -> [Element] -> State EvalState [Output]Source
evalNames :: [String] -> [Name] -> String -> State EvalState [Output]Source
evalDate :: [DatePart] -> [String] -> State EvalState [Output]Source
getTerm :: Bool -> Form -> String -> State EvalState StringSource
If the first parameter is True the plural form will be retrieved.
getStringVar :: String -> State EvalState StringSource
getDateVar :: String -> State EvalState [RefDate]Source
getLocVar :: String -> State EvalState (String, String)Source
getVar :: a -> (Value -> a) -> String -> State EvalState aSource
getAgents :: String -> State EvalState [Agent]Source
getFormattedValue :: String -> Form -> Formatting -> Value -> [Output]Source
getStringValue :: Value -> StringSource
getOptionVal :: String -> [Option] -> StringSource
isOptionSet :: String -> [Option] -> BoolSource
isVarSet :: String -> State EvalState BoolSource
withRefMap :: (ReferenceMap -> a) -> State EvalState aSource
formatNames :: Bool -> String -> [Agent] -> Name -> State EvalState [Output]Source
formatName :: Bool -> Form -> Formatting -> NameFormatting -> Agent -> [Output]Source
Generate the Agents names applying et-al options, with all possible permutations to disambiguate colliding citations.
formatLabel :: Form -> Formatting -> Bool -> Bool -> String -> State EvalState [Output]Source
formatDate :: String -> [TermMap] -> [DatePart] -> [RefDate] -> [Output]Source
output :: Formatting -> String -> [Output]Source
appendOutput :: Formatting -> [Output] -> [Output]Source
outputList :: Formatting -> Delimiter -> [Output] -> [Output]Source
cleanOutput :: [Output] -> [Output]Source
addDelim :: String -> [Output] -> [Output]Source
consumeVariable :: String -> State EvalState ()Source
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
formatVariable :: String -> StringSource
head' :: [a] -> [a]Source
trace :: String -> State EvalState ()Source
Produced by Haddock version 2.4.2