Commit 2ab2517a authored by Ryan Scott's avatar Ryan Scott

Add lens-4.18 patch

parent 91a2367e
Pipeline #9989 failed with stages
in 81 minutes and 2 seconds
commit b8f0b3a1ef12bf98d8db208cccc2d3a559f340a1
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Sun Sep 8 12:59:41 2019 -0400
Allow building with template-haskell-2.16.*
diff --git a/src/Language/Haskell/TH/Lens.hs b/src/Language/Haskell/TH/Lens.hs
index 856d1279..9b11dbe4 100644
--- a/src/Language/Haskell/TH/Lens.hs
+++ b/src/Language/Haskell/TH/Lens.hs
@@ -2067,7 +2067,15 @@ _TupE
= prism' reviewer remitter
where
reviewer = TupE
- remitter (TupE x) = Just x
+#if MIN_VERSION_template_haskell(2,16,0)
+ . map Just
+#endif
+ remitter (TupE x) =
+#if MIN_VERSION_template_haskell(2,16,0)
+ sequence x
+#else
+ Just x
+#endif
remitter _ = Nothing
_UnboxedTupE :: Prism' Exp [Exp]
@@ -2075,7 +2083,15 @@ _UnboxedTupE
= prism' reviewer remitter
where
reviewer = UnboxedTupE
- remitter (UnboxedTupE x) = Just x
+#if MIN_VERSION_template_haskell(2,16,0)
+ . map Just
+#endif
+ remitter (UnboxedTupE x) =
+#if MIN_VERSION_template_haskell(2,16,0)
+ sequence x
+#else
+ Just x
+#endif
remitter _ = Nothing
#if MIN_VERSION_template_haskell(2,12,0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment