Add principledStringIgnoreContext

This commit is contained in:
Ken Micklas 2018-11-17 14:56:59 -05:00
parent 8dc1762f8e
commit ff16557e34

View file

@ -9,6 +9,7 @@ module Nix.String (
, stringHasContext
, principledIntercalateNixString
, hackyStringIgnoreContextMaybe
, principledStringIgnoreContext
, hackyStringIgnoreContext
, hackyMakeNixStringWithoutContext
, principledMakeNixStringWithoutContext
@ -92,6 +93,10 @@ hackyStringIgnoreContextMaybe (NixString s c) | null c = Just s
| otherwise = Nothing
-- | Extract the string contents from a NixString even if the NixString has an associated context
principledStringIgnoreContext :: NixString -> Text
principledStringIgnoreContext (NixString s _) = s
-- | Extract the string contents from a NixString even if the NixString has an associated context
hackyStringIgnoreContext :: NixString -> Text
hackyStringIgnoreContext (NixString s _) = s