Right now all the pads parser combinators that get called by code generator generated code have types that look like PadsParser(rep,md), requiring in many places unnecessasry unwrapping and rewrapping of (rep,md) tuples. Using a state monad for metadata will:
Make parser combinator type signatures cleaner
Separate the semantics of underlying "runtime" details (metadata) from the semantics of Pads language features (constrain, transform, partition, ...)
Make it easier for new developers unfamiliar with the Pads runtime to add new language features
Right now all the pads parser combinators that get called by code generator generated code have types that look like
PadsParser(rep,md)
, requiring in many places unnecessasry unwrapping and rewrapping of(rep,md)
tuples. Using a state monad for metadata will: