Gentoo Archives: gentoo-commits

From: "Alexander Vershilov (qnikst)" <qnikst@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-haskell/readargs: metadata.xml readargs-1.2.1.ebuild ChangeLog
Date: Mon, 26 Aug 2013 12:37:36
Message-Id: 20130826123728.5CC062004C@flycatcher.gentoo.org
1 qnikst 13/08/26 12:37:28
2
3 Added: metadata.xml readargs-1.2.1.ebuild ChangeLog
4 Log:
5 dev-haskell/readargs: initial layout
6
7 (Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 0xEAD50D64D8D3571A!)
8
9 Revision Changes Path
10 1.1 dev-haskell/readargs/metadata.xml
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/readargs/metadata.xml?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/readargs/metadata.xml?rev=1.1&content-type=text/plain
14
15 Index: metadata.xml
16 ===================================================================
17 <?xml version="1.0" encoding="UTF-8"?>
18 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
19 <pkgmetadata>
20 <herd>haskell</herd>
21 <maintainer>
22 <email>haskell@g.o</email>
23 </maintainer>
24 <longdescription>
25 ReadArgs provides the @readArgs@ IO action, which lets you tell the compiler
26 to parse the command line arguments to fit the type signature you give.
27
28 For example @(a :: Int, b :: String, c :: Float) &lt;- readArgs@ would
29 parse the first runtime argument as an @Int@, the second as a @String@ (no
30 quotes required) and the third as a @Float@.
31
32 If the runtime arguments are incompatible with the type signature,
33 then a simple usage statement is given of the types needed.
34
35 Continuing the previous example, if it was used in a
36 program named @Example@, the error message for the above
37 action would be:
38
39 @
40 usage: Example Int String Float
41 @
42
43 Any type that has both @Typeable@ and @Read@ instances
44 can be used. @Char@, @String@, and @Text@ are handled specially so that
45 command line arguments for both do not require quotes (as their
46 @Read@ instances do). A special instance is provided for @FilePath@ so
47 that no constructor or quotes are required.
48
49 @readArgs@ also supports optional arguments and variadic arguments.
50 Optional arguments are specified using @Maybe@, and variadic arguments
51 using a list. @(a :: Int, b :: Maybe String, c :: [Float]) &lt;- readArgs@
52 would successfully parse any of the following sets of command line arguments:
53
54 @
55 Example 1
56 Example 1 2 3 4
57 Example 1 foo
58 Example 1 foo 2 3 4
59 @
60
61 But not
62
63 @
64 Example
65 Example foo
66 Example 1.0
67 @
68
69 Usage statements for optional and variadic arguments use command-line
70 parlance:
71
72 @
73 usage: Example Int [String] [Float..]
74 @
75
76 Note that both optional and variadic parsers are greedy by default
77 (so @Example 1 2 3 4@ was parsed as @(1, &quot;2&quot;, [3.0,4.0])@. They
78 may both be made non-greedy through use of the @NonGreedy@ constructor:
79
80 @
81 ( a :: Int
82 , NonGreedy b :: NonGreedy Maybe String
83 , NonGreedy c :: NonGreedy [] Float
84 ) &lt;- readArgs
85 @
86 </longdescription>
87 </pkgmetadata>
88
89
90
91 1.1 dev-haskell/readargs/readargs-1.2.1.ebuild
92
93 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/readargs/readargs-1.2.1.ebuild?rev=1.1&view=markup
94 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/readargs/readargs-1.2.1.ebuild?rev=1.1&content-type=text/plain
95
96 Index: readargs-1.2.1.ebuild
97 ===================================================================
98 # Copyright 1999-2013 Gentoo Foundation
99 # Distributed under the terms of the GNU General Public License v2
100 # $Header: /var/cvsroot/gentoo-x86/dev-haskell/readargs/readargs-1.2.1.ebuild,v 1.1 2013/08/26 12:37:28 qnikst Exp $
101
102 EAPI=5
103
104 # ebuild generated by hackport 0.3.9999
105
106 CABAL_FEATURES="bin lib profile haddock hoogle hscolour test-suite"
107 inherit haskell-cabal
108
109 MY_PN="ReadArgs"
110 MY_P="${MY_PN}-${PV}"
111
112 DESCRIPTION="Simple command line argument parsing"
113 HOMEPAGE="http://github.com/rampion/ReadArgs"
114 SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
115
116 LICENSE="BSD"
117 SLOT="0/${PV}"
118 KEYWORDS="~amd64 ~x86"
119 IUSE=""
120
121 RDEPEND=">=dev-haskell/system-filepath-0.4.7:=[profile?]
122 <dev-haskell/system-filepath-0.5:=[profile?]
123 >=dev-haskell/text-0.11.1.13:=[profile?]
124 <dev-haskell/text-12:=[profile?]
125 >=dev-lang/ghc-7.4.1:="
126 DEPEND="${RDEPEND}
127 test? ( >=dev-haskell/hspec-1.3
128 <dev-haskell/hspec-2
129 )
130 >=dev-haskell/cabal-1.8"
131
132 S="${WORKDIR}/${MY_P}"
133
134
135
136 1.1 dev-haskell/readargs/ChangeLog
137
138 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/readargs/ChangeLog?rev=1.1&view=markup
139 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/readargs/ChangeLog?rev=1.1&content-type=text/plain
140
141 Index: ChangeLog
142 ===================================================================
143 # ChangeLog for dev-haskell/readargs
144 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
145 # $Header: /var/cvsroot/gentoo-x86/dev-haskell/readargs/ChangeLog,v 1.1 2013/08/26 12:37:28 qnikst Exp $
146
147 *readargs-1.2.1 (26 Aug 2013)
148
149 26 Aug 2013; Alexander Vershilov <qnikst@g.o> +metadata.xml,
150 +readargs-1.2.1.ebuild:
151 dev-haskell/readargs: initial layout