fromLet's use the Parser newtypeOn Mon, Sep 28, 2015 at 2:28 PM, Jeffrey Brown <jeffbrown.the@gmail.com> wrote:I imagine a parser that operates on (String,[String]) pairs, for which the second element allows the user to define precedence on the fly.
newtype Parser a = Parser { parse :: String -> [(a,String)] }
http://dev.stephendiehl.com/fun/002_parsers.htmlas a basis for discussion.
Now you want to "operate on (String,[String]) pairs", so the Parser newtype must now look like this:type MyInput = (String,[String])newtype MyParser a = MyParser { parse :: MyInput -> [(a,MyInput)] }Is this what you have in mind?
-- Kim-Ee