diff options
Diffstat (limited to 'dev-haskell/language-haskell-extract')
3 files changed, 69 insertions, 0 deletions
diff --git a/dev-haskell/language-haskell-extract/Manifest b/dev-haskell/language-haskell-extract/Manifest new file mode 100644 index 000000000000..b6b08b3f9eeb --- /dev/null +++ b/dev-haskell/language-haskell-extract/Manifest @@ -0,0 +1 @@ +DIST language-haskell-extract-0.2.4.tar.gz 2458 SHA256 14da16e56665bf971723e0c5fd06dbb7cc30b4918cf8fb5748570785ded1acdb SHA512 6408459abf9d531ccbe7d65766d38fcb93f4d3f9c77db1a706231bf6d8ad6f845fcefc4fbb03833f45c74f21f324a44760f3c89ff093c69f1f9999e64344ab4d WHIRLPOOL 0832caa4b6715634112556daa0e0659f1baedcc7ca62139503286209e9069ebdc8e1f432c6f9fb8b21ab22b3dbf5219f21ee19bc563910489025cf98a97eaae9 diff --git a/dev-haskell/language-haskell-extract/language-haskell-extract-0.2.4.ebuild b/dev-haskell/language-haskell-extract/language-haskell-extract-0.2.4.ebuild new file mode 100644 index 000000000000..aa7947fbfad6 --- /dev/null +++ b/dev-haskell/language-haskell-extract/language-haskell-extract-0.2.4.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +# ebuild generated by hackport 0.3.2.9999 + +CABAL_FEATURES="lib profile haddock hoogle hscolour" +inherit haskell-cabal + +DESCRIPTION="Module to automatically extract functions from the local code" +HOMEPAGE="http://github.com/finnsson/template-helper" +SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-haskell/regex-posix:=[profile?] + >=dev-lang/ghc-6.10.4:=" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.6" diff --git a/dev-haskell/language-haskell-extract/metadata.xml b/dev-haskell/language-haskell-extract/metadata.xml new file mode 100644 index 000000000000..cfb283864121 --- /dev/null +++ b/dev-haskell/language-haskell-extract/metadata.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>haskell</herd> + <longdescription> + @language-haskell-extract@ contains some useful helper functions on top of Template Haskell. + + @functionExtractor@ extracts all functions after a regexp-pattern. + + > foo = "test" + > boo = "testing" + > bar = $(functionExtractor "oo$") + + will automagically extract the functions ending with @oo@ such as + + > bar = [("foo",foo), ("boo",boo)] + + This can be useful if you wish to extract all functions beginning with test (for a test-framework) + or all functions beginning with wc (for a web service). + + @functionExtractorMap@ works like @functionsExtractor@ but applies a function over all function-pairs. + + This functions is useful if the common return type of the functions is a type class. + + Example: + + > secondTypeclassTest = + > do let expected = ["45", "88.8", "\"hej\""] + > actual = $(functionExtractorMap "^tc" [|\n f -> show f|] ) + > expected @=? actual + > + > tcInt :: Integer + > tcInt = 45 + > + > tcDouble :: Double + > tcDouble = 88.8 + > + > tcString :: String + > tcString = "hej" + </longdescription> + <upstream> + <remote-id type="github">finnsson/template-helper</remote-id> + </upstream> +</pkgmetadata> |