DNS validation: use the G.<:> function.

beta
Philippe Pittoli 2024-02-16 02:38:56 +01:00
parent aec64681eb
commit de758a9e49
1 changed files with 1 additions and 2 deletions

View File

@ -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