We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c0287d commit 5ee5f4cCopy full SHA for 5ee5f4c
language-nix/src/Language/Nix/Identifier.hs
@@ -33,6 +33,14 @@ import Text.PrettyPrint.HughesPJClass as PP
33
-- >>> pPrint (ident # "foo.bar")
34
-- "foo.bar"
35
--
36
+-- The 'HasParser' class allows parsing rendered identifiers even if they are
37
+-- quoted:
38
+--
39
+-- >>> parseM "Identifier" "hello" :: Maybe Identifier
40
+-- Just (Identifier "hello")
41
+-- >>> parseM "Identifier" "\"3rd party\"" :: Maybe Identifier
42
+-- Just (Identifier "3rd party")
43
44
-- __Warning__: Identifiers /may not/ contain @\'\\0\'@, but this is not
45
-- checked during construction!
46
0 commit comments