Parse a whole Str using a Parser.
Fails with ParseError({ message, offset }), where offset is the byte
offset of the furthest failure. Input left over after the parser
succeeds is a failure too (see Parser.parse).
color : Parser(Utf8.Bytes, [Red, Green, Blue])
color =
Parser.one_of([
Parser.const(Red).skip(Utf8.string("red")),
Parser.const(Green).skip(Utf8.string("green")),
Parser.const(Blue).skip(Utf8.string("blue")),
])
expect Utf8.parse_str(color, "green") == Ok(Green)