Commit Graph

53 Commits

Author SHA1 Message Date
Gabriel Gonzalez
949c30258b Merge pull request #6 from echatav/master
Help messages
2016-03-12 12:17:24 -08:00
Gabriel Gonzalez
487e0c1b5d Version 1.0.0 => 1.0.1 2016-03-12 08:45:17 -08:00
Gabriel Gonzalez
c6e845cbe7 Fix parsing 4 or more alternatives 2016-03-12 08:36:59 -08:00
Gabriel Gonzalez
29365ac555 Fix endless loop when parsing three alternatives 2016-03-12 08:29:37 -08:00
Eitan Chatav
73d50b3e85 String ~> Text
I’m not sure what the performance implications are, but this way is
more consistent with the field label code.
2016-03-06 12:15:00 -08:00
Eitan Chatav
cc9bf846c0 don't need RankNTypes 2016-03-06 09:00:19 -08:00
Eitan Chatav
3a5cf11d97 small change
parseHelpfulFields mempty ~> parseHelpfulFields Nothing
2016-03-06 08:53:24 -08:00
Eitan Chatav
9802ebb4b4 some haddock comments 2016-03-06 08:40:11 -08:00
Eitan Chatav
d5c56d66ab remove commented out code 2016-03-06 08:30:33 -08:00
Eitan Chatav
43efbe5103 HelpMod ~> Maybe String
I used `String` instead of `Text` because `symbolVal` produces a
`String` and `Options.help` consumes a `String`.
2016-03-06 08:29:23 -08:00
Eitan Chatav
94d8bc9209 get rid of PolyKinds
use KindSignatures instead
2016-03-06 08:15:09 -08:00
Eitan Chatav
72f2de1059 rename to "Helpful"
and export constructor
2016-03-06 08:13:04 -08:00
Eitan Chatav
5583e9ca42 one more shot... 2016-02-29 18:37:41 -08:00
Eitan Chatav
a6581c2169 Travis fix 2
Hope this works…
2016-02-29 18:24:43 -08:00
Eitan Chatav
8b819bc23f Fix Travis
Uh-oh, looks like Travis is using GHC-7.6.3 whose base doesn’t come
with Data.Proxy
2016-02-29 17:06:39 -08:00
Eitan Chatav
1ec46b0681 Help messages
Add help messages using type level strings.
2016-02-29 16:44:27 -08:00
Gabriel Gonzalez
d0a26abb9e Merge branch 'master' of github.com:Gabriel439/Haskell-Optparse-Generic-Library 2016-02-28 14:33:08 -08:00
Gabriel Gonzalez
7662683475 Merge pull request #2 from DaveCTurner/issue-2
ParseField Day?
2016-02-28 14:31:20 -08:00
Gabriel Gonzalez
7fc59e0505 Workaround to fix missing Generic instances in ghc-8 2016-02-28 14:26:53 -08:00
David Turner
ddfdf107a5 Add lower bound on time >= 1.5 due to use of readSTime etc. 2016-02-28 18:39:06 +00:00
David Turner
48af1f6ce6 Add ParseField instance for Data.Time.Calendar.Day 2016-02-28 18:21:59 +00:00
Gabriel Gonzalez
682b606eab Merge pull request #3 from iblech/patch-1
Tiny markup fix
2016-02-28 07:07:59 -08:00
Ingo Blechschmidt
8b0a801673 Tiny markup fix 2016-02-28 15:59:55 +01:00
Gabriel Gonzalez
23c275a73d Removed unnecessary -O flag
Cabal supplies this automatically and won't let you upload a package if you
supply it
2016-02-27 23:34:34 -08:00
Gabriel Gonzalez
8e45724108 Add README.md 2016-02-27 21:34:22 -08:00
Gabriel Gonzalez
fc1a740479 Fix use of typeOf and also work with older versions of base 2016-02-27 21:30:38 -08:00
Gabriel Gonzalez
b9af9515a4 Use Data.Typeable.typeOf instead of typeRep
This is for backwards compatibility with older versions of `base`
2016-02-27 21:24:01 -08:00
Gabriel Gonzalez
b51d7bb12b Add void as a dependency for earlier versions of base 2016-02-27 21:20:18 -08:00
Gabriel Gonzalez
41e2e43e92 Add .travis.yml 2016-02-27 21:04:32 -08:00
Gabriel Gonzalez
1f4b46170d Add support for String. Fixes #1 2016-02-27 20:32:01 -08:00
Gabriel Gonzalez
77bbfe73f0 Explain what you can't generate a parser for 2016-02-27 14:16:52 -08:00
Gabriel Gonzalez
c5255115f2 Make ParseRecord a super-class of ParseFields
This ensures that any field can also be parsed as a "naked" top-level argument
2016-02-27 13:09:42 -08:00
Gabriel Gonzalez
32a15b339b Add ParseFields class
The purpose of this class is to avoid infinite loops from the user trying
to parse fields with types like `[[Int]]`
2016-02-27 12:01:32 -08:00
Gabriel Gonzalez
9636e086ae Add --help text for subcommands 2016-02-27 09:41:22 -08:00
Gabriel Gonzalez
ed5774527c Add more tutorial examples 2016-02-27 09:37:35 -08:00
Gabriel Gonzalez
7959b3e9b7 Add ParseRecord instance for Either 2016-02-27 09:37:22 -08:00
Gabriel Gonzalez
b2cc172ecc Only use -O instead of -O2 2016-02-27 09:36:46 -08:00
Gabriel Gonzalez
41c9a9018e Fix support for sum types and add tutorial examples 2016-02-27 09:26:33 -08:00
Gabriel Gonzalez
19e762ce86 Add Sum and Product instance for ParseField 2016-02-26 22:42:31 -08:00
Gabriel Gonzalez
c094cfc879 Change ParseField instance for () 2016-02-26 22:42:11 -08:00
Gabriel Gonzalez
b0f71c65dc Add First and Last instances for ParseField 2016-02-26 22:37:09 -08:00
Gabriel Gonzalez
e6f6fc4049 Fix description for ParseField 2016-02-26 22:31:41 -08:00
Gabriel Gonzalez
775784d6e3 Remove Only type
The user can very cheaply provide their own and this will also avoid them
having to hide the `Only` import
2016-02-26 22:30:42 -08:00
Gabriel Gonzalez
122e592950 Remove ParseRecord instances
These should be primarily user-derived instances
2016-02-26 22:29:19 -08:00
Gabriel Gonzalez
0afe894901 Replace Description with Text 2016-02-26 22:28:52 -08:00
Gabriel Gonzalez
f2cfa34c07 Ignore the constructor name if it is Only 2016-02-26 22:27:56 -08:00
Gabriel Gonzalez
8c3513f666 Update Only type to fall back on Generic implementation 2016-02-26 22:27:08 -08:00
Gabriel Gonzalez
fc5c972de4 Get rid of ParseField instance for String
This is to encourage people to use the instance for `Text` instead and to
avoid overlap with the instance for lists
2016-02-26 21:55:38 -08:00
Gabriel Gonzalez
df5544f0a5 Removed instances for Char
This is so that `String` is not an accidental valid instance in order to
encourage people to use `Text`
2016-02-26 21:51:30 -08:00
Gabriel Gonzalez
a1bfe014f5 Remove unused extensions 2016-02-26 20:30:38 -08:00