diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-haskell/readargs | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-haskell/readargs')
| -rw-r--r-- | dev-haskell/readargs/Manifest | 2 | ||||
| -rw-r--r-- | dev-haskell/readargs/metadata.xml | 75 | ||||
| -rw-r--r-- | dev-haskell/readargs/readargs-1.2.2.ebuild | 37 | ||||
| -rw-r--r-- | dev-haskell/readargs/readargs-1.2.3.ebuild | 32 |
4 files changed, 146 insertions, 0 deletions
diff --git a/dev-haskell/readargs/Manifest b/dev-haskell/readargs/Manifest new file mode 100644 index 000000000000..1f6ba42d2141 --- /dev/null +++ b/dev-haskell/readargs/Manifest @@ -0,0 +1,2 @@ +DIST ReadArgs-1.2.2.tar.gz 5102 BLAKE2B 4c1cefa9bc207d8e8473fb0e02aa5cdfef66c8b5135227ef83071325fc11f391226a15ff66e8adfa4ac6b83ebe276139a22e60df9a380c174cfb51ca0680aa5f SHA512 d6a50b4f3b97932f2edb67eb5d2af01f057b17f991f499c01c5005738cf96a55dc08453250e61a1dbbebad9c0a75c53e1caf0fbce00da5eb6c00e214595c331b +DIST ReadArgs-1.2.3.tar.gz 5100 BLAKE2B 8d0ee19cb417a0159b9a0488f30d11319c7ce278713bbf6c0531385b6c337c2aad5f85a3d22e8559c8b13b3a89a9f42174cb53fe6e4ae2190740845c9c70002b SHA512 6fd78b26c6c0d7d2f40f1b4eef248eb55d8dc91668b578b2cf88132a364dd7741f6f4d389aeb0c80bdca7cb5dfc1524228113495a2ea3595b888eb27fb8d2dff diff --git a/dev-haskell/readargs/metadata.xml b/dev-haskell/readargs/metadata.xml new file mode 100644 index 000000000000..4b62c689e2d8 --- /dev/null +++ b/dev-haskell/readargs/metadata.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>haskell@gentoo.org</email> + <name>Gentoo Haskell</name> + </maintainer> + <longdescription> + ReadArgs provides the @readArgs@ IO action, which lets you tell the compiler + to parse the command line arguments to fit the type signature you give. + + For example @(a :: Int, b :: String, c :: Float) <- readArgs@ would + parse the first runtime argument as an @Int@, the second as a @String@ (no + quotes required) and the third as a @Float@. + + If the runtime arguments are incompatible with the type signature, + then a simple usage statement is given of the types needed. + + Continuing the previous example, if it was used in a + program named @Example@, the error message for the above + action would be: + + @ + usage: Example Int String Float + @ + + Any type that has both @Typeable@ and @Read@ instances + can be used. @Char@, @String@, and @Text@ are handled specially so that + command line arguments for both do not require quotes (as their + @Read@ instances do). A special instance is provided for @FilePath@ so + that no constructor or quotes are required. + + @readArgs@ also supports optional arguments and variadic arguments. + Optional arguments are specified using @Maybe@, and variadic arguments + using a list. @(a :: Int, b :: Maybe String, c :: [Float]) <- readArgs@ + would successfully parse any of the following sets of command line arguments: + + @ + Example 1 + Example 1 2 3 4 + Example 1 foo + Example 1 foo 2 3 4 + @ + + But not + + @ + Example + Example foo + Example 1.0 + @ + + Usage statements for optional and variadic arguments use command-line + parlance: + + @ + usage: Example Int [String] [Float..] + @ + + Note that both optional and variadic parsers are greedy by default + (so @Example 1 2 3 4@ was parsed as @(1, "2", [3.0,4.0])@. They + may both be made non-greedy through use of the @NonGreedy@ constructor: + + @ + ( a :: Int + , NonGreedy b :: NonGreedy Maybe String + , NonGreedy c :: NonGreedy [] Float + ) <- readArgs + @ + </longdescription> + <upstream> + <remote-id type="github">rampion/ReadArgs</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/dev-haskell/readargs/readargs-1.2.2.ebuild b/dev-haskell/readargs/readargs-1.2.2.ebuild new file mode 100644 index 000000000000..348a5522d553 --- /dev/null +++ b/dev-haskell/readargs/readargs-1.2.2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +# ebuild generated by hackport 0.4.4.9999 + +CABAL_FEATURES="bin lib profile haddock hoogle hscolour test-suite" +inherit haskell-cabal + +MY_PN="ReadArgs" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Simple command line argument parsing" +HOMEPAGE="https://github.com/rampion/ReadArgs" +SRC_URI="https://hackage.haskell.org/package/${MY_P}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=">=dev-haskell/system-filepath-0.4.7:=[profile?] <dev-haskell/system-filepath-0.5:=[profile?] + >=dev-haskell/text-0.11.1.13:=[profile?] <dev-haskell/text-12:=[profile?] + >=dev-lang/ghc-7.4.1:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.8 + test? ( >=dev-haskell/hspec-1.3 ) +" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + cabal_chdeps \ + 'hspec >= 1.3 && < 2.1' 'hspec >= 1.3' +} diff --git a/dev-haskell/readargs/readargs-1.2.3.ebuild b/dev-haskell/readargs/readargs-1.2.3.ebuild new file mode 100644 index 000000000000..3c69dcd1e438 --- /dev/null +++ b/dev-haskell/readargs/readargs-1.2.3.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# ebuild generated by hackport 0.5.1.9999 + +CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" +inherit haskell-cabal + +MY_PN="ReadArgs" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Simple command line argument parsing" +HOMEPAGE="https://github.com/rampion/ReadArgs" +SRC_URI="https://hackage.haskell.org/package/${MY_P}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=">=dev-haskell/system-filepath-0.4.7:=[profile?] <dev-haskell/system-filepath-0.5:=[profile?] + >=dev-haskell/text-0.11.1.13:=[profile?] <dev-haskell/text-12:=[profile?] + >=dev-lang/ghc-7.4.1:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.8 + test? ( >=dev-haskell/hspec-1.3 <dev-haskell/hspec-3 ) +" + +S="${WORKDIR}/${MY_P}" |
