State package:parsec

Returns the full parser state as a State record.
Returns the current user state.
modifyState f applies function f to the user state. Suppose that we want to count identifiers in a source, we could use the user state as:
expr  = do{ x <- identifier
; modifyState (+1)
; return (Id x)
}
putState st set the user state to st.
setParserState st set the full parser state to st.
An alias for putState for backwards compatibility.
updateParserState f applies function f to the parser state.
An alias for modifyState for backwards compatibility.