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
The way the combinators are written, it is tough to work with them since the code doesn't compile due to value restriction errors until a parse function is applied. It might be worthwhile to make the combinators work such that the developer can build them up independently and not have to compose and pass them to a parse function in order to know whether it compiles.
Repro code
let matchOnHome = s "home"
let matchOnPost = s "blog" </> i32
Expected and actual results
I think it would be helpful to be able to write something like the above so that the match expressions can be encapsulated, but right now that code generates value restrictions errors until you apply a parse function.
Related information
fable-elmish version: 0.9.2
fable-compiler version: 1.1.9
fable-core version: 1.1.7
Operating system: Windows 10
The text was updated successfully, but these errors were encountered:
Value restriction is something we have to live with in F#, you can add explicit type annotations to avoid the error. Fundamentally, what makes the parser-combinators attractive and type-safe is their generic nature, creating an API to circumvent that would defeat the purpose.
fable-arch used a port of FParsec, maybe you want to look into that, maybe you'll like that parser better.
Description
The way the combinators are written, it is tough to work with them since the code doesn't compile due to value restriction errors until a parse function is applied. It might be worthwhile to make the combinators work such that the developer can build them up independently and not have to compose and pass them to a parse function in order to know whether it compiles.
Repro code
Expected and actual results
I think it would be helpful to be able to write something like the above so that the match expressions can be encapsulated, but right now that code generates value restrictions errors until you apply a parse function.
Related information
The text was updated successfully, but these errors were encountered: