[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28884] [PATCH 07/38] gnu: Add ghc-language-haskell-extract.
From: |
Ludovic Courtès |
Subject: |
[bug#28884] [PATCH 07/38] gnu: Add ghc-language-haskell-extract. |
Date: |
Sat, 21 Oct 2017 20:52:38 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
rsiddharth <address@hidden> skribis:
> * gnu/packages/haskell.scm
> (ghc-language-haskell-extract): New variable.
For the record, I've committed this one with the changes below:
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 48da78bb9..3b93d8628 --- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -9193,48 +9193,10 @@ the local code")
(description "This package contains helper functions on top of
Template Haskell.
address@hidden extracts all functions after a regexp-pattern.
-
address@hidden
- foo = \"test\"
- boo = \"testing\"
- bar = $\(functionExtractor \"oo$\")
address@hidden verbatim
-
-will automagically extract the functions ending with @code{oo} such as
-
address@hidden
- bar = [\(\"foo\",foo), \(\"boo\",boo)]
address@hidden 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).
-
address@hidden 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:
-
address@hidden
- 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\"
address@hidden verbatim
-")
+For example, @code{functionExtractor} extracts all functions after a
+regexp-pattern, which can be useful if you wish to extract all functions
+beginning with @code{test} (for a test-framework) or all functions beginning
+with @code{wc} (for a web service).")
(license license:bsd-3)))
;;; haskell.scm ends here
Ludo’.
- [bug#28884] [PATCH 00/38] Add ghc-aws and its dependencies., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 01/38] gnu: Add ghc-errors., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 04/38] gnu: Add ghc-math-functions., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 03/38] gnu: Add ghc-erf., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 02/38] gnu: Add ghc-vector-th-unbox., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 09/38] gnu: Add ghc-abstract-par., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 07/38] gnu: Add ghc-language-haskell-extract., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 07/38] gnu: Add ghc-language-haskell-extract.,
Ludovic Courtès <=
- [bug#28884] [PATCH 05/38] gnu: Add ghc-mwc-random., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 06/38] gnu: Add ghc-vector-algorithms., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 08/38] gnu: Add ghc-test-framework-th., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 11/38] gnu: Add ghc-abstract-deque., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 12/38] gnu: Add ghc-monad-par., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 10/38] gnu: Add ghc-monad-par-extras., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 13/38] gnu: ghc-base-orphans: Update to 0.6., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 15/38] gnu: Add ghc-chunked-data., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 14/38] gnu: Add ghc-statistics., rsiddharth, 2017/10/17