You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
s "blog" in your example refers to a "static" portion - something that is expected to be present in the input, but is not captured, ie the parser as specified has no instructions to extract something and I guess the compiler can't infer the types involved. parse str "blog" would do what you expect it to do.
The idea of this parser-combinator module is that a single type unifies the parsed out values, what you are asking for can only be represented by a DU, so you need to pass the map function to construct it.
Description
Referring to Parsing Routes in the docs, I was not able to parse a string literal.
Repro code
Expected and actual result
I figured it would compile and yield Some "blog", however, the expression doesn't compile due to the following error:
Related information
The text was updated successfully, but these errors were encountered: