summaryrefslogtreecommitdiff
path: root/dev-haskell/options
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-haskell/options
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-haskell/options')
-rw-r--r--dev-haskell/options/Manifest1
-rw-r--r--dev-haskell/options/metadata.xml64
-rw-r--r--dev-haskell/options/options-1.2.1.1.ebuild30
3 files changed, 95 insertions, 0 deletions
diff --git a/dev-haskell/options/Manifest b/dev-haskell/options/Manifest
new file mode 100644
index 000000000000..c7c54738adab
--- /dev/null
+++ b/dev-haskell/options/Manifest
@@ -0,0 +1 @@
+DIST options-1.2.1.1.tar.gz 25327 BLAKE2B 66611694e5beb558e185cd9a89e9368ebac035118360a4c1cb9bcba5ad2a0be74c32848e3983aec999b4cee6e3138c527fe31c869b52c84719ee89afe3aad232 SHA512 615a3767b74ca0ba2eae993f6e475963df2a0933f1e6c9bbfe35144c4dc6018af276144b2ec1b608b695dc7fca904784ebc63cd58a432f966588846cb36f94ea
diff --git a/dev-haskell/options/metadata.xml b/dev-haskell/options/metadata.xml
new file mode 100644
index 000000000000..51509139fefe
--- /dev/null
+++ b/dev-haskell/options/metadata.xml
@@ -0,0 +1,64 @@
+<?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>
+ The @options@ package lets library and application developers easily work
+ with command-line options.
+
+ The following example is a full program that can accept two options,
+ @--message@ and @--quiet@:
+
+ @
+ import Control.Applicative
+ import Options
+
+ data MainOptions = MainOptions
+ &amp;#x20; &amp;#x7b; optMessage :: String
+ &amp;#x20; , optQuiet :: Bool
+ &amp;#x20; &amp;#x7d;
+
+ instance 'Options' MainOptions where
+ &amp;#x20; defineOptions = pure MainOptions
+ &amp;#x20; \&lt;*\&gt; simpleOption \"message\" \"Hello world!\"
+ &amp;#x20; \"A message to show the user.\"
+ &amp;#x20; \&lt;*\&gt; simpleOption \"quiet\" False
+ &amp;#x20; \"Whether to be quiet.\"
+
+ main :: IO ()
+ main = runCommand $ \\opts args -&gt; do
+ &amp;#x20; if optQuiet opts
+ &amp;#x20; then return ()
+ &amp;#x20; else putStrLn (optMessage opts)
+ @
+
+ &gt;$ ./hello
+ &gt;Hello world!
+ &gt;$ ./hello --message='ciao mondo'
+ &gt;ciao mondo
+ &gt;$ ./hello --quiet
+ &gt;$
+
+ In addition, this library will automatically create documentation options
+ such as @--help@ and @--help-all@:
+
+ &gt;$ ./hello --help
+ &gt;Help Options:
+ &gt; -h, --help
+ &gt; Show option summary.
+ &gt; --help-all
+ &gt; Show all help options.
+ &gt;
+ &gt;Application Options:
+ &gt; --message :: text
+ &gt; A message to show the user.
+ &gt; default: "Hello world!"
+ &gt; --quiet :: bool
+ &gt; Whether to be quiet.
+ &gt; default: false
+ </longdescription>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>
diff --git a/dev-haskell/options/options-1.2.1.1.ebuild b/dev-haskell/options/options-1.2.1.1.ebuild
new file mode 100644
index 000000000000..e37b14b6908d
--- /dev/null
+++ b/dev-haskell/options/options-1.2.1.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2020 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="lib profile haddock hoogle hscolour test-suite"
+inherit haskell-cabal
+
+DESCRIPTION="A powerful and easy-to-use command-line option parser"
+HOMEPAGE="https://john-millikin.com/software/haskell-options/"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+RESTRICT=test # circular depends
+
+RDEPEND=">=dev-haskell/monads-tf-0.1:=[profile?]
+ >=dev-haskell/transformers-0.2:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+ test? ( >=dev-haskell/chell-0.4 <dev-haskell/chell-0.5
+ >=dev-haskell/chell-quickcheck-0.2 <dev-haskell/chell-quickcheck-0.3 )
+"