unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob a1358dec94db40f0f8f5686974ddb7eaf37d60c6 961 bytes (raw)
name: packages/patches/ghc-language-haskell-extract-ghc-8.10.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
Compatibility with GHC 8.10 and template-haskell 2.16.

Taken from 
https://raw.githubusercontent.com/archlinux/svntogit-community/packages/haskell-language-haskell-extract/trunk/ghc-8.10.patch

diff --git a/src/Language/Haskell/Extract.hs b/src/Language/Haskell/Extract.hs
index 3e8958b..43dfe04 100644
--- a/src/Language/Haskell/Extract.hs
+++ b/src/Language/Haskell/Extract.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 module Language.Haskell.Extract (
   functionExtractor,
   functionExtractorMap,
@@ -25,7 +26,11 @@ extractAllFunctions pattern =
 functionExtractor :: String -> ExpQ
 functionExtractor pattern =
   do functions <- extractAllFunctions pattern
-     let makePair n = TupE [ LitE $ StringL n , VarE $ mkName n]
+     let makePair n = TupE
+#if MIN_VERSION_template_haskell(2,16,0)
+                           $ map Just
+#endif
+                           [ LitE $ StringL n , VarE $ mkName n]
      return $ ListE $ map makePair functions
 
 

debug log:

solving a1358dec94db40f0f8f5686974ddb7eaf37d60c6 ...
found a1358dec94db40f0f8f5686974ddb7eaf37d60c6 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).