From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6LNu-0006jA-HN for guix-patches@gnu.org; Sun, 22 Oct 2017 14:54:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6LNq-0005rD-Kk for guix-patches@gnu.org; Sun, 22 Oct 2017 14:54:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47522) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6LNq-0005qz-Gm for guix-patches@gnu.org; Sun, 22 Oct 2017 14:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e6LNq-0008UW-7A for guix-patches@gnu.org; Sun, 22 Oct 2017 14:54:02 -0400 Subject: [bug#28884] [PATCH 07/38] gnu: Add ghc-language-haskell-extract. In-Reply-To: <20171018030217.1001-1-s@ricketyspace.net> Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Date: Sat, 21 Oct 2017 20:52:38 -0700 References: <20171018030217.1001-1-s@ricketyspace.net> <20171018030758.1211-1-s@ricketyspace.net> <20171018030758.1211-7-s@ricketyspace.net> Message-ID: <87y3o310c0.fsf@inria.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: rsiddharth Cc: 28884@debbugs.gnu.org --=-=-= Content-Type: text/plain rsiddharth skribis: > * gnu/packages/haskell.scm > (ghc-language-haskell-extract): New variable. For the record, I've committed this one with the changes below: --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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. -@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 -") +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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 DQpMdWRv4oCZLg0K --=-=-=--