Safe Haskell | None |
---|---|
Language | Haskell2010 |
Helper functions for working with source templates
- filterList :: (Ann e dom SrcTemplateStage -> Bool) -> AnnList e dom SrcTemplateStage -> AnnList e dom SrcTemplateStage
- replaceList :: [Ann e dom SrcTemplateStage] -> AnnList e dom SrcTemplateStage -> AnnList e dom SrcTemplateStage
- insertWhere :: Ann e dom SrcTemplateStage -> (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> AnnList e dom SrcTemplateStage -> AnnList e dom SrcTemplateStage
- insertIndex :: (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> [Ann e dom SrcTemplateStage] -> Maybe Int
- child :: SpanInfo SrcTemplateStage
- opt :: OptionalInfo SrcTemplateStage
- optBefore :: String -> OptionalInfo SrcTemplateStage
- optAfter :: String -> OptionalInfo SrcTemplateStage
- list :: ListInfo SrcTemplateStage
- indentedList :: ListInfo SrcTemplateStage
- indentedListBefore :: String -> ListInfo SrcTemplateStage
- indentedListAfter :: String -> ListInfo SrcTemplateStage
- listSep :: String -> ListInfo SrcTemplateStage
- listSepBefore :: String -> String -> ListInfo SrcTemplateStage
- listSepAfter :: String -> String -> ListInfo SrcTemplateStage
- (<>) :: SpanInfo SrcTemplateStage -> SpanInfo SrcTemplateStage -> SpanInfo SrcTemplateStage
Documentation
filterList :: (Ann e dom SrcTemplateStage -> Bool) -> AnnList e dom SrcTemplateStage -> AnnList e dom SrcTemplateStage Source #
replaceList :: [Ann e dom SrcTemplateStage] -> AnnList e dom SrcTemplateStage -> AnnList e dom SrcTemplateStage Source #
Replaces the list with a new one with the given elements, keeping the most common separator as the new one.
insertWhere :: Ann e dom SrcTemplateStage -> (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> AnnList e dom SrcTemplateStage -> AnnList e dom SrcTemplateStage Source #
Inserts the element in the places where the two positioning functions (one checks the element before, one the element after) allows the placement.
insertIndex :: (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> [Ann e dom SrcTemplateStage] -> Maybe Int Source #
Checks where the element will be inserted given the two positioning functions.
listSepBefore :: String -> String -> ListInfo SrcTemplateStage Source #
listSepAfter :: String -> String -> ListInfo SrcTemplateStage Source #
(<>) :: SpanInfo SrcTemplateStage -> SpanInfo SrcTemplateStage -> SpanInfo SrcTemplateStage Source #
Concatenates two source templates to produce a new template with all child elements.