úÎ!1Ë.Ï*      !"#$%&'()None7>MŽ language-nix[Identifiers in Nix are essentially strings. They can be constructed (and viewed) with the , isomorphism. For the sake of convenience,  Identifiers are an instance of the * class.BReasonable people restrict themselves to identifiers of the form [a-zA-Z_][a-zA-Z0-9_'-]*8, because these don't need quoting. The methods of the TextP class can be used to parse and pretty-print an identifier with proper quoting:pPrint (ident # "test")testpPrint (ident # "foo.bar") "foo.bar"8\str -> Just (ident # str) == parseM "Ident" (quote str)=\i -> Just (i :: Identifier) == parseM "Ident" (prettyShow i) language-nix)An isomorphism that allows conversion of  from/to the standard + type via ,.%\str -> fromString str == ident # str.\str -> set ident str undefined == ident # str,\str -> view ident (review ident str) == str language-nixIParsec parser for simple identifiers, i.e. those that don't need quoting. language-nixReadP0 parser for quoted identifiers, i.e. those that do need quoting. language-nixDChecks whether a given string needs quoting when interpreted as an K. Simple identifiers that don't need quoting match the regular expression ^[a-zA-Z_][a-zA-Z0-9_'-]*$.  language-nix@Helper function to quote a given identifier string if necessary.putStrLn (quote "abc")abcputStrLn (quote "abc.def") "abc.def"  None7)) language-nix0Paths are non-empty lists of identifiers in Nix.path # [ident # "yo"]Path [Identifier "yo"]2Any attempt to construct the empty path throws an -::set -XScopedTypeVariablesceither (\(_::SomeException) -> "empty paths are illegal") show <$> Excpt.try (evaluate (path # []))"empty paths are illegal"0Paths can be pretty-printed and parsed with the Text class:*parse "Path" "foo.\"foo.bar\".bar" :: Path=Path [Identifier "foo",Identifier "foo.bar",Identifier "bar"]7pPrint (parse "Path" "foo.\"foo\".\"bar\".bar" :: Path)foo.foo.bar.bar6\p -> Just (p :: Path) == parseM "Path" (prettyShow p)?Paths are instances of strings and can be implicitly converted::set -XOverloadedStringspPrint $ ("yo.bar" :: Path)yo.bar!pPrint $ (" yo . bar" :: Path)yo.bar.Freaky quoted identifiers are fine throughout:pPrint $ path # ["yo","b\"ar"] yo."b\"ar"pPrint ("\"5ident\"" :: Path)"5ident"/pPrint $ path # ["5ident","foo.bar","foo\nbar"]"5ident"."foo.bar"."foo\nbar" language-nixnUse this isomorphism to construct a path from a list of identifiers, or to access that list for a given path.None7>-æ language-nixA 4 represents an identifier that refers to some other .:set -XOverloadedStrings""inherit (foo.bar) abc" :: BindingSBind (Identifier "abc") (Path [Identifier "foo",Identifier "bar",Identifier "abc"])<\b -> Just (b :: Binding) == parseM "Binding" (prettyShow b)None.<  Safe.ª./0123456      !"#$%&'()*+,-./012034567089:;<=>?@AB)language-nix-2.2.0-4V8HiyuJODaH1hiGHTNPvOLanguage.Nix.IdentifierLanguage.Nix.PathLanguage.Nix.Binding Language.NixPaths_language_nix IdentifieridentPathBinding localName referenceparseSimpleIdentifierparseQuotedIdentifier needsQuotingquote$fHasParserIdentifier$fPrettyIdentifier$fCoArbitraryIdentifier$fArbitraryIdentifier$fNFDataIdentifier$fShowIdentifier$fEqIdentifier$fOrdIdentifier$fIsStringIdentifier$fGenericIdentifierpath$fCoArbitraryPath$fArbitraryPath$fIsStringPath$fHasParserPath $fPrettyPath $fNFDataPath $fShowPath$fEqPath $fOrdPath $fGenericPathbinding$fIsStringBinding$fHasParserBinding$fPrettyBinding$fCoArbitraryBinding$fArbitraryBinding$fNFDataBinding $fShowBinding $fEqBinding $fOrdBinding$fGenericBindingbase Data.StringIsStringGHC.BaseString"lens-4.18.1-JAFcmQC7pDa2H0eUzO2c3XControl.Lens.ReviewreviewGHC.Errerrorversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName