lambdatex-0.1.0.2: Type-Safe LaTeX EDSL

Safe HaskellNone
LanguageHaskell2010

Text.LaTeX.LambdaTeX.Selection.Internal

Contents

Synopsis

Documentation

selects :: Part -> [Selector] -> Bool Source

Whether a part is selected by a given list of selectors.

A part is selected if:

All parts are selected or It it is matched and not ignored.

isSelected :: Monad m => ΛTeXT m Bool Source

Whether the current part is selected to be generated

Current part Helpers

currentPart :: Monad m => ΛTeXT m Part Source

Returns the current part from the ΛTeX state

inPart :: Monad m => Text -> ΛTeXT m () -> ΛTeXT m () Source

Execute the following function with a given sub-part name

pushCurrentPart :: Monad m => Text -> ΛTeXT m () Source

Push a new part name onto the current part stack

WARNING: This should never be used outside of inPart

popCurrentPart :: Monad m => ΛTeXT m () Source

Pop a part name off the current part stack

WARNING: This should never be used outside of inPart

Text Helpers

split :: String -> [String] Source

Split a string on a dot. This can be useful to convert from a Selectors textual representation back to a selector

split = splitOn '.'

splitOn :: Char -> String -> [String] Source

Split a string on a specific character

matches :: [Text] -> [Text] -> Bool Source

Tests whether a given part matches a given selector's part specification