From: rsiddharth <s@ricketyspace.net>
To: 28884@debbugs.gnu.org
Cc: s@ricketyspace.net
Subject: [bug#28884] [PATCH 07/38] gnu: Add ghc-language-haskell-extract.
Date: Wed, 18 Oct 2017 03:07:27 +0000 [thread overview]
Message-ID: <20171018030758.1211-7-s@ricketyspace.net> (raw)
In-Reply-To: <20171018030758.1211-1-s@ricketyspace.net>
* gnu/packages/haskell.scm
(ghc-language-haskell-extract): New variable.
---
gnu/packages/haskell.scm | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 43a8565f6..2f064e2b2 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -9171,4 +9171,70 @@ between 2 and 3 times faster than the Mersenne Twister.")
(description "This Haskell library algorithms for vector arrays.")
(license license:bsd-3)))
+(define-public ghc-language-haskell-extract
+ (package
+ (name "ghc-language-haskell-extract")
+ (version "0.2.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "language-haskell-extract-" version "/"
+ "language-haskell-extract-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1nxcs7g8a1sp91bzpy4cj6s31k5pvc3gvig04cbrggv5cvjidnhl"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-regex-posix" ,ghc-regex-posix)))
+ (home-page "https://github.com/finnsson/template-helper")
+ (synopsis "Haskell module to automatically extract functions from
+the local code")
+ (description "This package contains helper functions on top of
+Template Haskell.
+
+@code{functionExtractor} extracts all functions after a regexp-pattern.
+
+@verbatim
+ foo = \"test\"
+ boo = \"testing\"
+ bar = $\(functionExtractor \"oo$\")
+@end verbatim
+
+will automagically extract the functions ending with @code{oo} such as
+
+@verbatim
+ bar = [\(\"foo\",foo), \(\"boo\",boo)]
+@end verbatim
+
+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).
+
+@code{functionExtractorMap} works like @code{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:
+
+@verbatim
+ 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\"
+@end verbatim
+")
+ (license license:bsd-3)))
+
;;; haskell.scm ends here
--
2.15.0.rc0
next prev parent reply other threads:[~2017-10-18 3:09 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 3:02 [bug#28884] [PATCH 00/38] Add ghc-aws and its dependencies rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 01/38] gnu: Add ghc-errors rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 02/38] gnu: Add ghc-vector-th-unbox rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 03/38] gnu: Add ghc-erf rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 04/38] gnu: Add ghc-math-functions rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 05/38] gnu: Add ghc-mwc-random rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 06/38] gnu: Add ghc-vector-algorithms rsiddharth
2017-10-18 3:07 ` rsiddharth [this message]
2017-10-22 3:52 ` [bug#28884] [PATCH 07/38] gnu: Add ghc-language-haskell-extract Ludovic Courtès
2017-10-18 3:07 ` [bug#28884] [PATCH 08/38] gnu: Add ghc-test-framework-th rsiddharth
2017-10-22 21:56 ` Ludovic Courtès
2017-10-18 3:07 ` [bug#28884] [PATCH 09/38] gnu: Add ghc-abstract-par rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 10/38] gnu: Add ghc-monad-par-extras rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 11/38] gnu: Add ghc-abstract-deque rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 12/38] gnu: Add ghc-monad-par rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 13/38] gnu: ghc-base-orphans: Update to 0.6 rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 14/38] gnu: Add ghc-statistics rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 15/38] gnu: Add ghc-chunked-data rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 16/38] gnu: Add ghc-base-prelude rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 17/38] gnu: Add ghc-tuple-th rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 18/38] gnu: Add ghc-contravariant-extras rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 19/38] gnu: Add ghc-monadrandom rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 20/38] gnu: Add ghc-either rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 21/38] gnu: Add ghc-entropy rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 22/38] gnu: Add ghc-crypto-api rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 23/38] gnu: Add ghc-crypto-api-tests rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 24/38] gnu: Add ghc-pretty-hex rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 25/38] gnu: Add ghc-puremd5 rsiddharth
2017-10-22 22:01 ` Ludovic Courtès
2017-10-18 3:07 ` [bug#28884] [PATCH 26/38] gnu: Add ghc-cryptohash-md5 rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 27/38] gnu: Add ghc-cryptohash-sha1 rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 28/38] gnu: Add ghc-network-info rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 29/38] gnu: Add ghc-uuid-types rsiddharth
2017-10-22 22:05 ` Ludovic Courtès
2017-10-18 3:07 ` [bug#28884] [PATCH 30/38] gnu: Add ghc-uuid rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 31/38] gnu: Add ghc-rebase rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 32/38] gnu: Add ghc-vector-builder rsiddharth
2017-10-22 22:09 ` Ludovic Courtès
2017-10-18 3:07 ` [bug#28884] [PATCH 33/38] gnu: Add ghc-foldl rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 34/38] gnu: Add ghc-mono-traversable rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 35/38] gnu: ghc-conduit: Update to 1.2.12.1 rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 36/38] gnu: ghc-conduit: Fix lint error rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 37/38] gnu: Add ghc-conduit-combinators rsiddharth
2017-10-18 3:07 ` [bug#28884] [PATCH 38/38] gnu: Add ghc-aws rsiddharth
2017-10-22 22:14 ` [bug#28884] [PATCH 01/38] gnu: Add ghc-errors Ludovic Courtès
2017-10-23 21:56 ` rsiddharth
2017-10-21 9:40 ` [bug#28884] [PATCH 00/38] Add ghc-aws and its dependencies Ludovic Courtès
2017-10-22 22:35 ` bug#28884: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171018030758.1211-7-s@ricketyspace.net \
--to=s@ricketyspace.net \
--cc=28884@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.