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 } ... If I now call my program with, ./foo --flag1 --flag2 arg1 arg2 then usernames = [ "arg1", "arg2" ] as desired. However, I need to wrap usernames in a newtype for an unrelated reason: newtype Usernames = Usernames [String] Now, CmdArgs unexpectedly drops the first non-flag argument. So, ./foo --flag1 --flag2 arg1 arg2 gives me usernames = [ "arg2" ]. Obviously not what I want! Has anyone else run into this? Figured out a workaround? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe