hnix-0.10.1: Haskell implementation of the Nix language
Safe HaskellNone
LanguageHaskell2010

Nix.Expr.Strings

Description

Functions for manipulating nix strings.

Synopsis

Documentation

mergePlain :: [Antiquoted Text r] -> [Antiquoted Text r] Source #

Merge adjacent Plain values with mappend.

removePlainEmpty :: [Antiquoted Text r] -> [Antiquoted Text r] Source #

Remove Plain values equal to mempty, as they don't have any informational content.

runAntiquoted :: v -> (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.