<div dir="ltr"><div class="gmail_extra">On Tue, Jan 22, 2013 at 7:52 PM, Sean Cormican <span dir="ltr">&lt;<a href="mailto:seancormican1@gmail.com" target="_blank">seancormican1@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>2. Can anyone recommend if this is a good source to 
learn to use the Parsec Library or if there are any other recommended 
documents I would benefit from ? </div><div></div></blockquote></div><br>I think Daan wrote a lucid if slightly  bitrotted parsec tutorial (and not just parsec itself) that many library users can benefit from. In addition, it gives a good glimpse of the thinking behind the library design. If only more libraries on hackage were similarly documented.</div>

<div class="gmail_extra"><br>For a grasp of the evolution from the pre- to the post-monad picture, I&#39;d also recommend the following sources cited in the tutorial. The Monad and MonadPlus instances act as familiar sugar over the otherwise more brittle code that results from working with the combinators directly. The sugar is translated away eventually, so it&#39;s still necessary to grasp the underlying higher-order functions.<br>

<br>Graham Hutton. (1992)<br>Higher-order functions for parsing.<br>Journal of Functional Programming 2: 232-343. <br><a href="http://www.cs.nott.ac.uk/Department/Staff/gmh/parsing.ps">http://www.cs.nott.ac.uk/Department/Staff/gmh/parsing.ps</a>.<br>

<br>Graham Hutton and Erik Meijer. (1996)<br>Monadic Parser Combinators.<br>Technical report NOTTCS-TR-96-4. Department of Computer Science, University of Nottingham. <br><a href="http://www.cs.nott.ac.uk/Department/Staff/gmh/monparsing.ps">http://www.cs.nott.ac.uk/Department/Staff/gmh/monparsing.ps</a>.<br>

<br>And also the chapter in Hutton&#39;s textbook.</div><div class="gmail_extra"><br></div><div class="gmail_extra" style>It&#39;s also useful to know that parser combinators vs parser generators (like yacc and happy) are good examples of shallow- vs deeply-embedded DSLs. Many of the relative advantages of each aren&#39;t specific to parsing but apply generally to the shallow vs deep divide. &lt;---- Digressing further, let me just note that much of the knowledge of DSL design and implementation is folklore for which there&#39;s no good source of information. One could do worse than take parsing as a case study and go from there.</div>

<div class="gmail_extra" style><br></div><div class="gmail_extra" style>-- Kim-Ee<br></div></div>