<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">[Shameless promotion]<div class=""><br class=""><div class="">I once wrote a parser combinator library. Something everyone does once in his life ;-}<div class=""><br class=""></div><div class="">Then I realised that I could run parsers in an interleaved way, and wrote the package uu-interleaved”. In remarkably few lines of code this can turn a parser combinator library in a a library that can run parsers in an interleavedway . If you look at the code in:</div><div class=""><br class=""></div><div class=""><a href="http://hackage.haskell.org/package/uu-interleaved-0.2.0.1/docs/src/Control.Applicative.Interleaved.html" class="">http://hackage.haskell.org/package/uu-interleaved-0.2.0.1/docs/src/Control.Applicative.Interleaved.html</a></div><div class=""><br class=""></div><div class="">this boils down to writing a few instances for a new data type. Although the code is intricate it is very short, and the types guided me get the code correct. Without te types I would have spent ages in getting things to work.</div><div class=""><br class=""></div><div class="">The I realised that by adding just a few extra lines of code this could be turned in a package for writing code for dealing with command line arguments in a very broad sense: repeating arguments, dealing with missing obligatory arguments, optional arguments and parsing the arguments according to what they stand for and reporting errors in the command line in a systematic way </div><div class=""><br class=""></div><div class="">Surprisingly the the code of this package is probably less that what an ordinary program spends on processing it's command line arguments, while providing much larger security.</div><div class=""><br class=""></div><div class=""> [End of shameless promotion]</div><div class=""><br class=""></div><div class="">If your audience consists of experienced programmers they must have been spending quite some time on code that is no longer necessary when using such a package.</div><div class=""><br class=""></div><div class=""> Doaitse</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""></div></div></div></body></html>