| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.Nix.Path
- data Path
- path :: Iso' Path [Identifier]
Documentation
Paths are non-empty lists of identifiers in Nix.
>>>path # [ident # "yo"]Path [Identifier "yo"]
Any attempt to construct the empty path throws an error:
>>>path # []Path *** Exception: Nix paths cannot be empty
Identifier is an instance of IsString:
>>>:set -XOverloadedStrings>>>pPrint $ path # ["yo","bar"]yo.bar
Freaky quoted identifiers are fine except in the first segment:
>>>pPrint $ path # ["yo","b\"ar"]yo."b\"ar">>>pPrint $ path # ["5ident"]*** Exception: invalid Nix path: [Identifier "5ident"]>>>pPrint $ path # ["5ident","foo","bar"]*** Exception: invalid Nix path: [Identifier "5ident",Identifier "foo",Identifier "bar"]
path :: Iso' Path [Identifier] Source