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 -> Text -> Text -> Text
- getTerm :: Bool -> Form -> Text -> State EvalState Text
- getStringVar :: Text -> State EvalState Text
- getDateVar :: Text -> State EvalState [RefDate]
- getLocVar :: State EvalState (Text, Text)
- getVar :: a -> (Value -> a) -> Text -> State EvalState a
- getAgents :: Text -> State EvalState [Agent]
- getAgents' :: Text -> State EvalState [Agent]
- getStringValue :: Value -> Text
- getOptionVal :: Text -> [Option] -> Text
- getOptionValWithDefault :: Text -> Text -> [Option] -> Text
- isOptionSet :: Text -> [Option] -> Bool
- isTitleVar :: Text -> Bool
- isTitleShortVar :: Text -> Bool
- getTitleShort :: Text -> State EvalState Text
- isVarSet :: Text -> State EvalState Bool
- withRefMap :: (ReferenceMap -> a) -> State EvalState a
- formatVariable :: Text -> Text
- consumeVariable :: Text -> 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 -> Text -> Text -> Text Source #
With the variable name and the variable value search for an abbreviation or return an empty string.
getTerm :: Bool -> Form -> Text -> State EvalState Text Source #
If the first parameter is True
the plural form will be retrieved.
getStringValue :: Value -> Text Source #
isTitleVar :: Text -> Bool Source #
isTitleShortVar :: Text -> Bool Source #
withRefMap :: (ReferenceMap -> a) -> State EvalState a Source #
formatVariable :: Text -> Text Source #
Convert variable to lower case, translating underscores ("_") to dashes ("-")