[Haskell-cafe] GetOpt
Einar Karttunen
ekarttun at cs.helsinki.fi
Thu Apr 27 16:09:57 EDT 2006
On 27.04 12:32, Mirko Rahn wrote:
> So it would be much better to define the options in the library and to
> provide this definitions to the user program somehow. I tought about
> this topic several times and came up with a solution that works for me
> but is far from being perfect. It uses existentials and a main
> disadvantage is the need of explicit traversing. Moreover some new
> boilerplate code is necessary.
HAppS has a typeclass for this kind of thing also:
http://test.happs.org/auto/apidoc/HAppS-Util-StdMain-Config.html
http://test.happs.org/HAppS/src/HAppS/Util/StdMain/Config.hs
and for an example instance see:
http://test.happs.org/HAppS/src/HAppS/Protocols/SimpleHTTP.hs
- Einar Karttunen
More information about the Haskell-Cafe
mailing list