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 0393a98 commit e642d06Copy full SHA for e642d06
src/Data/Uri/Query.hs
@@ -39,6 +39,7 @@ initParserState xs = ParserState
39
40
data ParserError
41
= NoParse
42
+ deriving (Show, Eq)
43
44
45
@@ -70,6 +71,23 @@ instance Alternative Parser where
70
71
put s'
72
pure y'
73
Left e -> throwError e
74
+ some f = Parser $ do
75
+ s <- get
76
+ case runParser' f s of
77
+ Right (x, s') -> do
78
+ put s'
79
+ xs <- getParser $ many f
80
+ pure (x:xs)
81
+ Left e -> throwError e
82
+ many f = Parser $ do
83
84
85
86
87
88
89
+ Left _ ->
90
+ pure []
91
92
93
unlabeled :: PieceParser a -> Parser a
0 commit comments