Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions for manipulating nix strings.
- mergePlain :: Monoid v => [Antiquoted v r] -> [Antiquoted v r]
- removePlainEmpty :: (Eq v, Monoid v) => [Antiquoted v r] -> [Antiquoted v r]
- runAntiquoted :: (v -> a) -> (r -> a) -> Antiquoted v r -> a
- splitLines :: [Antiquoted Text r] -> [[Antiquoted Text r]]
- unsplitLines :: [[Antiquoted Text r]] -> [Antiquoted Text r]
- stripIndent :: [Antiquoted Text r] -> NString r
- escapeCodes :: [(Char, Char)]
- fromEscapeCode :: Char -> Maybe Char
- toEscapeCode :: Char -> Maybe Char
Documentation
mergePlain :: Monoid v => [Antiquoted v r] -> [Antiquoted v r] Source #
removePlainEmpty :: (Eq v, Monoid v) => [Antiquoted v r] -> [Antiquoted v r] Source #
runAntiquoted :: (v -> a) -> (r -> a) -> Antiquoted v r -> a Source #
Equivalent to case splitting on Antiquoted
strings.
splitLines :: [Antiquoted Text r] -> [[Antiquoted Text r]] Source #
Split a stream representing a string with antiquotes on line breaks.
unsplitLines :: [[Antiquoted Text r]] -> [Antiquoted Text r] Source #
Join a stream of strings containing antiquotes again. This is the inverse
of splitLines
.
stripIndent :: [Antiquoted Text r] -> NString r Source #
Form an indented string by stripping spaces equal to the minimal indent.
escapeCodes :: [(Char, Char)] Source #