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

Portability | unportable
Stability | unstable
Maintainer | Andrea Rossato <andrea.rossato@unitn.it>

Text.CSL.Eval.Common

Description

The CSL implementation

Synopsis

- data EvalState = EvalState {
  - ref :: ReferenceMap
  - env :: Environment
  - debug :: [String]
  - mode :: EvalMode
  - disamb :: Bool
  - consume :: Bool
  - authSub :: String
  - consumed :: [String]
  - edtrans :: Bool
  - etal :: [[Output]]
  - contNum :: [Agent]
  - lastName :: [Output]
  }
- data Environment = Env {
  - cite :: Cite
  - terms :: [TermMap]
  - macros :: [MacroMap]
  - dates :: [Element]
  - options :: [Option]
  - names :: [Element]
  }
- data EvalMode
  - = EvalSorting Cite
  - | EvalCite Cite
  - | EvalBiblio String
- getCite :: EvalMode -> Cite
- isSorting :: EvalMode -> Bool
- getTerm :: Bool -> Form -> String -> State EvalState String
- getStringVar :: String -> State EvalState String
- getDateVar :: String -> State EvalState [RefDate]
- getLocVar :: State EvalState (String, String)
- getVar :: a -> (Value -> a) -> String -> State EvalState a
- getAgents :: String -> State EvalState [Agent]
- getAgents' :: String -> State EvalState [Agent]
- getStringValue :: Value -> String
- getOptionVal :: String -> [Option] -> String
- isOptionSet :: String -> [Option] -> Bool
- isVarSet :: String -> State EvalState Bool
- withRefMap :: (ReferenceMap -> a) -> State EvalState a
- formatVariable :: String -> String
- 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]
- trace :: String -> State EvalState ()

# Documentation

data EvalState

Constructors

EvalState |
Fields ref :: ReferenceMap env :: Environment debug :: [String] mode :: EvalMode disamb :: Bool consume :: Bool authSub :: String consumed :: [String] edtrans :: Bool etal :: [[Output]] contNum :: [Agent] lastName :: [Output]

Instances

Show EvalState |

data Environment

Constructors

Env |
Fields cite :: Cite terms :: [TermMap] macros :: [MacroMap] dates :: [Element] options :: [Option] names :: [Element]

Instances

Show Environment |

data EvalMode

Constructors

EvalSorting Cite |
EvalCite Cite |
EvalBiblio String |

Instances

Eq EvalMode |
Show EvalMode |

getCite :: EvalMode -> Cite

isSorting :: EvalMode -> Bool

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

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

getStringVar :: String -> State EvalState String

getDateVar :: String -> State EvalState [RefDate]

getLocVar :: State EvalState (String, String)

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

getAgents :: String -> State EvalState [Agent]

getAgents' :: String -> State EvalState [Agent]

getStringValue :: Value -> String

getOptionVal :: String -> [Option] -> String

isOptionSet :: String -> [Option] -> Bool

isVarSet :: String -> State EvalState Bool

withRefMap :: (ReferenceMap -> a) -> State EvalState a

formatVariable :: String -> String

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]

trace :: String -> State EvalState ()