ndmitchell / cmdargs

Haskell library for command line argument processing
Other
91 stars 12 forks source link

Support Data.Text[.Lazy].Text and Filesystem.Path.FilePath #31

Open ndmitchell opened 9 years ago

ndmitchell commented 9 years ago

From http://code.google.com/p/ndmitchell/issues/detail?id=580

These types are now very commonly used in Haskell and it would be very helpful to be able to use them directly in the arguments record. I'd think that adding the dependency on the text package probably isn't too big a deal since it's part of Haskell Platform. Not sure if you're OK the dependency on system-filepath, which is not part of HP.

@ndmitchell replied:

bytestring should probably also go on that list as String-like things that should be supported. I'd much rather avoid the dependency on text/filepath though, since I have deliberately tried to keep the dependencies of cmdargs very light, since it is such a small piece of most applications.

I wonder if there is some scope for going via IsString instances (which is probably what we really want), although can't immediately thing how that should be done...