
18 Dec
2007
18 Dec
'07
5:54 p.m.
On Dec 18, 2007 11:28 PM, Bulat Ziganshin
Hello Lemmih,
Wednesday, December 19, 2007, 1:22:43 AM, you wrote:
Indeed, we to this in HAppS, for instance. Folding the resulting list makes the current GetOpt implementation more than adequate.
this is problem important for me too - i have >50 options. can you please give us a small example of such approach?
Henning posted the specialized structure: data ArgDescr a = NoArg (a -> a) ReqArg (String -> a -> a) String OptArg (String -> a -> a) String which is a same as: type DirectArgDescr a = ArgDescr (a -> a) The "flags" can be combined using: foldr ($) emptyConfig flags. -- Cheers, Lemmih