1cabal-version:      >= 1.18
2build-type:         Simple
3name:               cmdargs
4version:            0.10.20
5license:            BSD3
6license-file:       LICENSE
7category:           Console
8author:             Neil Mitchell <ndmitchell@gmail.com>
9maintainer:         Neil Mitchell <ndmitchell@gmail.com>
10copyright:          Neil Mitchell 2009-2018
11synopsis:           Command line argument processing
12description:
13    This library provides an easy way to define command line parsers. Most users
14    will want to use the "System.Console.CmdArgs.Implicit" module, whose
15    documentation contains an example.
16    .
17    * "System.Console.CmdArgs.Explicit" provides a way to write command line
18      parsers for both single mode programs (most programs) and multiple
19      mode programs (e.g. darcs or cabal). Parsers are defined by constructing
20      a data structure.
21    .
22    * "System.Console.CmdArgs.Implicit" provides a way to concisely define
23      command line parsers, up to three times shorter than getopt. These parsers
24      are translated into the Explicit data type.
25    .
26    * "System.Console.CmdArgs.GetOpt" provides a wrapper allowing compatiblity
27      with existing getopt parsers, mapping to the Explicit data type.
28    .
29    For a general reference on what command line flags are commonly used,
30    see <http://www.faqs.org/docs/artu/ch10s05.html>.
31bug-reports:        https://github.com/ndmitchell/cmdargs/issues
32homepage:           https://github.com/ndmitchell/cmdargs#readme
33extra-doc-files:
34    README.md
35    CHANGES.txt
36tested-with:        GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
37
38source-repository head
39    type:     git
40    location: https://github.com/ndmitchell/cmdargs.git
41
42flag testprog
43    default: False
44    manual: True
45    description: Build the test program
46
47flag quotation
48    default: True
49    manual: True
50    description: Build the Quote module
51
52library
53    default-language: Haskell2010
54    build-depends:
55        base >= 4.4 && < 5,
56        filepath,
57        transformers >= 0.2,
58        process >= 1.0
59
60    if impl(ghc < 8.0)
61        build-depends: semigroups >= 0.18
62
63    if flag(quotation)
64        build-depends: template-haskell
65        exposed-modules: System.Console.CmdArgs.Quote
66        -- See bug #539 for why this magic is required
67        other-extensions: TemplateHaskell
68
69    exposed-modules:
70        System.Console.CmdArgs
71        System.Console.CmdArgs.Annotate
72        System.Console.CmdArgs.Default
73        System.Console.CmdArgs.Explicit
74        System.Console.CmdArgs.GetOpt
75        System.Console.CmdArgs.Implicit
76        System.Console.CmdArgs.Text
77        System.Console.CmdArgs.Helper
78        System.Console.CmdArgs.Verbosity
79
80    other-modules:
81        Data.Generics.Any
82        Data.Generics.Any.Prelude
83        System.Console.CmdArgs.Explicit.Complete
84        System.Console.CmdArgs.Explicit.ExpandArgsAt
85        System.Console.CmdArgs.Explicit.Help
86        System.Console.CmdArgs.Explicit.Process
87        System.Console.CmdArgs.Explicit.SplitJoin
88        System.Console.CmdArgs.Explicit.Type
89        System.Console.CmdArgs.Implicit.Ann
90        System.Console.CmdArgs.Implicit.Global
91        System.Console.CmdArgs.Implicit.Local
92        System.Console.CmdArgs.Implicit.Reader
93        System.Console.CmdArgs.Implicit.Reform
94        System.Console.CmdArgs.Implicit.Type
95        System.Console.CmdArgs.Implicit.UI
96
97executable cmdargs
98    default-language: Haskell2010
99    main-is: Main.hs
100    other-extensions: TemplateHaskell
101    build-depends:
102        base, transformers, filepath, process, template-haskell
103    if flag(testprog) && flag(quotation)
104        buildable: True
105    else
106        buildable: False
107
108    other-modules:
109        System.Console.CmdArgs.Test.All
110        System.Console.CmdArgs.Test.Explicit
111        System.Console.CmdArgs.Test.GetOpt
112        System.Console.CmdArgs.Test.Implicit
113        System.Console.CmdArgs.Test.Implicit.Diffy
114        System.Console.CmdArgs.Test.Implicit.HLint
115        System.Console.CmdArgs.Test.Implicit.Maker
116        System.Console.CmdArgs.Test.Implicit.Tests
117        System.Console.CmdArgs.Test.Implicit.Util
118        System.Console.CmdArgs.Test.SplitJoin
119        System.Console.CmdArgs.Test.Util
120