Copyright | (c) Andrea Rossato |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Andrea Rossato <andrea.rossato@unitn.it> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
The CSL implementation
Synopsis
- data EvalState = EvalState {}
- data Environment = Env {}
- data EvalMode
- isSorting :: EvalMode -> Bool
- getAbbreviation :: Abbreviations -> String -> String -> String
- 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
- isTitleVar :: String -> Bool
- isTitleShortVar :: String -> Bool
- getTitleShort :: String -> State EvalState String
- 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]
Documentation
data Environment Source #
Instances
Show Environment Source # | |
Defined in Text.CSL.Eval.Common showsPrec :: Int -> Environment -> ShowS # show :: Environment -> String # showList :: [Environment] -> ShowS # |
getAbbreviation :: Abbreviations -> String -> String -> String Source #
With the variable name and the variable value search for an abbreviation or return an empty string.
getTerm :: Bool -> Form -> String -> State EvalState String Source #
If the first parameter is True
the plural form will be retrieved.
getStringValue :: Value -> String Source #
isTitleVar :: String -> Bool Source #
isTitleShortVar :: String -> Bool Source #
withRefMap :: (ReferenceMap -> a) -> State EvalState a Source #
formatVariable :: String -> String Source #
Convert variable to lower case, translating underscores ("_") to dashes ("-")