Add principledStringMempty
This commit is contained in:
parent
a0a89248e9
commit
124f7165e4
|
@ -16,6 +16,7 @@ module Nix.String (
|
|||
, principledMakeNixStringWithSingletonContext
|
||||
, principledModifyNixContents
|
||||
, principledStringMappend
|
||||
, principledStringMempty
|
||||
, principledStringMConcat
|
||||
) where
|
||||
|
||||
|
@ -76,6 +77,10 @@ principledIntercalateNixString sep nss = NixString contents ctx
|
|||
hackyStringMConcat :: [NixString] -> NixString
|
||||
hackyStringMConcat = foldr hackyStringMappend (NixString mempty mempty)
|
||||
|
||||
-- | Empty string with empty context.
|
||||
principledStringMempty :: NixString
|
||||
principledStringMempty = NixString mempty mempty
|
||||
|
||||
-- | Combine NixStrings using mconcat
|
||||
principledStringMConcat :: [NixString] -> NixString
|
||||
principledStringMConcat = foldr principledStringMappend (NixString mempty mempty)
|
||||
|
|
Loading…
Reference in a new issue