Open Forist2034 opened 2 weeks ago
Maybe provide something like peekToken or Alternative instance of Decoder.
Like this:
decodeIpAddress = peekToken >>= \case TkTag 52 -> decodeIpv4 -- decoder for ipv4 address TkTag 54 -> decodeIpv6 _ -> fail "invalid ip address"
Maybe provide something like peekToken or Alternative instance of Decoder.
Like this: