| citeproc-hs-0.2: A Citation Style Language implementation in Haskell | Source code | Contents | Index
Text.CSL.Eval |
Portability | unportable
Stability | unstable
Maintainer | Andrea 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] |
Instances
Show Environment
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 String | Source
If the first parameter is `True` the plural form will be retrieved.
getStringVar :: String -> State EvalState String | Source
getDateVar :: String -> State EvalState [RefDate] | Source
getLocVar :: String -> State EvalState (String, String) | Source
getVar :: a -> (Value -> a) -> String -> State EvalState a | Source
getAgents :: String -> State EvalState [Agent] | Source
getFormattedValue :: String -> Form -> Formatting -> Value -> [Output] | Source
getStringValue :: Value -> String | Source
getOptionVal :: String -> [Option] -> String | Source
isOptionSet :: String -> [Option] -> Bool | Source
isVarSet :: String -> State EvalState Bool | Source
withRefMap :: (ReferenceMap -> a) -> State EvalState a | Source
formatNames :: Bool -> String -> [Agent] -> Name -> State EvalState [Output] | Source
formatName :: Bool -> Form -> Formatting -> NameFormatting -> Agent -> [Output] | Source
Generate the `Agent`s 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 a | Source
when' :: Monad m => m Bool -> m [a] -> m [a] | Source
whenElse :: Monad m => m Bool -> m a -> m a -> m a | Source
concatMapM :: (Monad m, Functor m, Eq b) => (a -> m [b]) -> [a] -> m [b] | Source
formatVariable :: String -> String | Source
head' :: [a] -> [a] | Source
trace :: String -> State EvalState () | Source
Produced by Haddock version 2.4.2