markhibberd / pirate

Non-horrible command line parsing.
https://github.com/markhibberd/pirate
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

Replace P Monad with transformer stack #35

Closed HuwCampbell closed 9 years ago

HuwCampbell commented 9 years ago

There's really only one purpose for this, which is to embed a "Context" for the parsing into the return type, which indicates which subcommand the parser failed inside, so a better help text can be printed.

markhibberd commented 9 years ago

Stack looks right. I am a bit meh on stacks that deep in scala, because there are some walls where you will find it won't work any more (for example I don't know if you will be able to implement MonadTrans and use liftM generically in this situation). But if it works for now I am fine with it.

markhibberd commented 9 years ago

One note though, I think we really need to start adding a much more comprehensive test suite before the internals get any more churn.