Re: [Haskell-cafe] CmdArgs non-flag arguments with newtypes

2013-07-29 Thread Michael Orlitzky
On 07/23/2013 11:48 PM, wren ng thornton wrote: On 7/23/13 9:01 PM, Michael Orlitzky wrote: Obviously not what I want! Has anyone else run into this? Figured out a workaround? I haven't run into this specific problem, but I do have a sort of workaround. Whenever dealing with CmdArgs (or any

[Haskell-cafe] CmdArgs non-flag arguments with newtypes

2013-07-23 Thread Michael Orlitzky
I ran into an issue wrapping a [String] in a newtype with CmdArgs. You're supposed to be able to declare that a field contains a list of non-flag arguments... this works fine: data Cfg = Cfg { whatever flags, usernames :: [String] } arg_spec = Cfg { whatever flags, usernames = def = args }

Re: [Haskell-cafe] CmdArgs non-flag arguments with newtypes

2013-07-23 Thread wren ng thornton
On 7/23/13 9:01 PM, Michael Orlitzky wrote: Obviously not what I want! Has anyone else run into this? Figured out a workaround? I haven't run into this specific problem, but I do have a sort of workaround. Whenever dealing with CmdArgs (or any similar system) I typically define *two* record