DNS validation: use the G.<:> function.
This commit is contained in:
parent
aec64681eb
commit
de758a9e49
@ -207,8 +207,7 @@ data ProtocolError
|
||||
|
||||
protocol_parser :: G.Parser ProtocolError String
|
||||
protocol_parser = do
|
||||
pos <- G.current_position
|
||||
G.string "tcp" <|> G.string "udp" <|> G.Parser \_ -> G.failureError pos (Just InvalidProtocol)
|
||||
G.string "tcp" <|> G.string "udp" G.<:> \_ -> InvalidProtocol
|
||||
|
||||
is_between :: Int -> Int -> Int -> (Int -> Int -> Int -> Error) -> V (Array Error) Int
|
||||
is_between min max n ve = if between min max n
|
||||
|
Loading…
Reference in New Issue
Block a user