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
One useful feature that megaparsec has compared to parsec is the ability to get the remainder of the input. In fact, I think it is so useful that it would make sense to expose this functionality explicitly.
In the meantime, it is accessible via runParser', however it is not easy to use given that this function requires the initial state, which is pretty tricky and boilerplate-y to construct. I think, it would be helpful to export initialState used by runParser in order to:
Better support the use case of getting the remaining input.
In general, simplify the initial state creation to allow the user to just override the fields in the default state that they want.
The text was updated successfully, but these errors were encountered:
Although there is a problem: hspec-megaparsec already exports a very similar function called initialState. If we export initialState from Megaparsec it may break existing code. Perhaps we could call it differently though.
One useful feature that
megaparsec
has compared toparsec
is the ability to get the remainder of the input. In fact, I think it is so useful that it would make sense to expose this functionality explicitly.In the meantime, it is accessible via
runParser'
, however it is not easy to use given that this function requires the initial state, which is pretty tricky and boilerplate-y to construct. I think, it would be helpful to exportinitialState
used byrunParser
in order to:The text was updated successfully, but these errors were encountered: