shakespeare-2.1.0: A toolkit for making compile-time interpolated templates
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Internal.Lucius

Synopsis

Documentation

parseBlock :: Order -> Parser (Block 'Unresolved) Source #

detectAmp :: Block 'Unresolved -> (Bool, Block 'Unresolved) Source #

Looks for an & at the beginning of a selector and, if present, indicates that we should not have a leading space. Otherwise, we should have the leading space.

partitionPBs :: Order -> [PairBlock] -> ([Either (Attr 'Unresolved) Deref], [Block 'Unresolved]) Source #

trim :: Contents -> Contents Source #

data PairBlock Source #

Constructors

PBAttr (Attr 'Unresolved) 
PBBlock (Block 'Unresolved) 
PBMixin Deref 

parsePair :: Parser (Attr 'Unresolved) Source #

atMost :: Int -> Parser a -> Parser [a] Source #

parseTopLevels :: Order -> Parser [TopLevel 'Unresolved] Source #

luciusRTWithOrder' Source #

Arguments

:: Order

Should we keep attributes and mixins order or not

-> Text 
-> Either String ([(Text, Text)] -> Either String [TopLevel 'Resolved]) 

luciusRTInternal :: Order -> Text -> Either String ([(Text, RTValue)] -> Either String [TopLevel 'Resolved]) Source #

luciusRTMixinWithOrder Source #

Arguments

:: Order 
-> Text

template

-> Bool

minify?

-> [(Text, RTValue)]

scope

-> Either String Text 

data RTValue Source #

Constructors

RTVRaw Text 
RTVMixin Mixin 

luciusUsedIdentifiers :: Order -> String -> [(Deref, VarType)] Source #

Determine which identifiers are used by the given template, useful for creating systems like yesod devel.