<div dir="ltr">I appear to be able to read Text.Megaparsec.Expr! This is a breakthrough for me. I think I refactor it. Thanks, and sorry for the noise.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 19, 2017 at 3:13 AM, S D Swierstra <span dir="ltr"><<a href="mailto:doaitse.swierstra@gmail.com" target="_blank">doaitse.swierstra@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>Make the #uses expr #because expr #needs part act like an operator?</div><div><br></div><div>Doaitse</div><div><div class="h5"><div><br>Op 19 aug. 2017 om 05:56 heeft Jeffrey Brown <<a href="mailto:jeffbrown.the@gmail.com" target="_blank">jeffbrown.the@gmail.com</a>> het volgende geschreven:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>I want to write a parser that lets someone write "(a #uses b) #because (c #needs d)" and read it into a tree:</div><div><br></div><div> data Tree = Tree String Tree Tree | Leaf String</div><div> magic "(a #uses b) #because (c #needs d)"</div><div> = Tree "because" (Tree "uses" (Leaf "a") (Leaf "b"))</div><div> (Tree "needs" (Leaf "c") (Leaf "d"))</div><div><br></div><div>I thought I could use Text.Megaparsec.Expr for it, but now I realize it hadnles binary operations, and this is a ternary one.</div><div><br></div><div>Suggestions?</div><div><br></div><div><br></div>-- <br><div class="m_-2617824913950547982gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Jeff Brown | Jeffrey Benjamin Brown</div><div dir="ltr"><a href="https://msu.edu/~brown202/" style="font-size:12.8px" target="_blank">Website</a> | <a href="https://www.facebook.com/mejeff.younotjeff" style="font-size:12.8px" target="_blank">Facebook</a> | <a href="https://www.linkedin.com/in/jeffreybenjaminbrown" style="font-size:12.8px" target="_blank">LinkedIn</a><span style="font-size:12.8px">(spammy, so I often miss messages here) </span><span style="font-size:12.8px">|</span><span style="font-size:12.8px"> </span><a href="https://github.com/jeffreybenjaminbrown" style="font-size:12.8px" target="_blank">Github</a><span style="font-size:12.8px"> </span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
</div></blockquote></div></div><blockquote type="cite"><div><span>______________________________<wbr>_________________</span><span class=""><br><span>Haskell-Cafe mailing list</span><br><span>To (un)subscribe, modify options or view archives go to:</span><br><span><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a></span><br><span>Only members subscribed via the mailman list are allowed to post.</span></span></div></blockquote></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Jeff Brown | Jeffrey Benjamin Brown</div><div dir="ltr"><a href="https://msu.edu/~brown202/" style="font-size:12.8px" target="_blank">Website</a> | <a href="https://www.facebook.com/mejeff.younotjeff" style="font-size:12.8px" target="_blank">Facebook</a> | <a href="https://www.linkedin.com/in/jeffreybenjaminbrown" style="font-size:12.8px" target="_blank">LinkedIn</a><span style="font-size:12.8px">(spammy, so I often miss messages here) </span><span style="font-size:12.8px">|</span><span style="font-size:12.8px"> </span><a href="https://github.com/jeffreybenjaminbrown" style="font-size:12.8px" target="_blank">Github</a><span style="font-size:12.8px"> </span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>