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