archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-language-haskell-extract / trunk / ghc-8.10.patch
blobe909c2f84ca14273c50d8fd5261d3c8a3d9c1633
1 diff --git a/src/Language/Haskell/Extract.hs b/src/Language/Haskell/Extract.hs
2 index 3e8958b..43dfe04 100644
3 --- a/src/Language/Haskell/Extract.hs
4 +++ b/src/Language/Haskell/Extract.hs
5 @@ -1,3 +1,4 @@
6 +{-# LANGUAGE CPP #-}
7 module Language.Haskell.Extract (
8 functionExtractor,
9 functionExtractorMap,
10 @@ -25,7 +26,11 @@ extractAllFunctions pattern =
11 functionExtractor :: String -> ExpQ
12 functionExtractor pattern =
13 do functions <- extractAllFunctions pattern
14 - let makePair n = TupE [ LitE $ StringL n , VarE $ mkName n]
15 + let makePair n = TupE
16 +#if MIN_VERSION_template_haskell(2,16,0)
17 + $ map Just
18 +#endif
19 + [ LitE $ StringL n , VarE $ mkName n]
20 return $ ListE $ map makePair functions