summaryrefslogtreecommitdiff
path: root/standalone/no-th/haskell-patches/lens_no-TH.patch
diff options
context:
space:
mode:
Diffstat (limited to 'standalone/no-th/haskell-patches/lens_no-TH.patch')
-rw-r--r--standalone/no-th/haskell-patches/lens_no-TH.patch174
1 files changed, 101 insertions, 73 deletions
diff --git a/standalone/no-th/haskell-patches/lens_no-TH.patch b/standalone/no-th/haskell-patches/lens_no-TH.patch
index ffcf0027e..81e370146 100644
--- a/standalone/no-th/haskell-patches/lens_no-TH.patch
+++ b/standalone/no-th/haskell-patches/lens_no-TH.patch
@@ -1,52 +1,58 @@
-From 2b5fa1851a84f58b43e7c4224bd5695a32a80de9 Mon Sep 17 00:00:00 2001
+From b9b3cd52735f9ede1a83960968dc1f0e91e061d6 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
-Date: Wed, 18 Dec 2013 03:27:54 +0000
+Date: Fri, 7 Feb 2014 21:49:11 +0000
Subject: [PATCH] avoid TH
---
- lens.cabal | 13 +------------
- src/Control/Lens.hs | 4 ++--
- src/Control/Lens/Internal/Exception.hs | 30 ------------------------------
- src/Control/Lens/Prism.hs | 2 --
- 4 files changed, 3 insertions(+), 46 deletions(-)
+ lens.cabal | 14 +-------------
+ src/Control/Lens.hs | 6 ++----
+ src/Control/Lens/Cons.hs | 2 --
+ src/Control/Lens/Internal/Fold.hs | 2 --
+ src/Control/Lens/Internal/Reflection.hs | 2 --
+ src/Control/Lens/Prism.hs | 2 --
+ src/Control/Monad/Primitive/Lens.hs | 1 -
+ 7 files changed, 3 insertions(+), 26 deletions(-)
diff --git a/lens.cabal b/lens.cabal
-index 8477892..a6ac7a5 100644
+index cee2da7..1e467c4 100644
--- a/lens.cabal
+++ b/lens.cabal
@@ -10,7 +10,7 @@ stability: provisional
homepage: http://github.com/ekmett/lens/
bug-reports: http://github.com/ekmett/lens/issues
- copyright: Copyright (C) 2012-2013 Edward A. Kmett
+ copyright: Copyright (C) 2012-2014 Edward A. Kmett
-build-type: Custom
+build-type: Simple
+ -- build-tools: cpphs
tested-with: GHC == 7.6.3
synopsis: Lenses, Folds and Traversals
- description:
-@@ -173,7 +173,6 @@ library
- containers >= 0.4.0 && < 0.6,
- distributive >= 0.3 && < 1,
- filepath >= 1.2.0.0 && < 1.4,
-- generic-deriving >= 1.4 && < 1.7,
- ghc-prim,
- hashable >= 1.1.2.3 && < 1.3,
- MonadCatchIO-transformers >= 0.3 && < 0.4,
-@@ -235,14 +234,12 @@ library
+@@ -216,7 +216,6 @@ library
+ Control.Exception.Lens
+ Control.Lens
+ Control.Lens.Action
+- Control.Lens.At
+ Control.Lens.Combinators
+ Control.Lens.Cons
+ Control.Lens.Each
+@@ -256,17 +255,14 @@ library
+ Control.Lens.Reified
Control.Lens.Review
Control.Lens.Setter
- Control.Lens.Simple
- Control.Lens.TH
Control.Lens.Traversal
Control.Lens.Tuple
Control.Lens.Type
Control.Lens.Wrapped
- Control.Lens.Zipper
Control.Lens.Zoom
- Control.Monad.Error.Lens
+ Control.Monad.Primitive.Lens
Control.Parallel.Strategies.Lens
Control.Seq.Lens
+- Data.Aeson.Lens
Data.Array.Lens
-@@ -266,12 +263,8 @@ library
+ Data.Bits.Lens
+ Data.ByteString.Lens
+@@ -289,12 +285,8 @@ library
Data.Typeable.Lens
Data.Vector.Lens
Data.Vector.Generic.Lens
@@ -58,8 +64,8 @@ index 8477892..a6ac7a5 100644
- Language.Haskell.TH.Lens
Numeric.Lens
- if flag(safe)
-@@ -370,7 +363,6 @@ test-suite doctests
+ other-modules:
+@@ -394,7 +386,6 @@ test-suite doctests
deepseq,
doctest >= 0.9.1,
filepath,
@@ -67,7 +73,7 @@ index 8477892..a6ac7a5 100644
mtl,
nats,
parallel,
-@@ -396,7 +388,6 @@ benchmark plated
+@@ -432,7 +423,6 @@ benchmark plated
comonad,
criterion,
deepseq,
@@ -75,7 +81,7 @@ index 8477892..a6ac7a5 100644
lens,
transformers
-@@ -431,7 +422,6 @@ benchmark unsafe
+@@ -467,7 +457,6 @@ benchmark unsafe
comonads-fd,
criterion,
deepseq,
@@ -83,7 +89,7 @@ index 8477892..a6ac7a5 100644
lens,
transformers
-@@ -448,6 +438,5 @@ benchmark zipper
+@@ -484,6 +473,5 @@ benchmark zipper
comonads-fd,
criterion,
deepseq,
@@ -91,77 +97,87 @@ index 8477892..a6ac7a5 100644
lens,
transformers
diff --git a/src/Control/Lens.hs b/src/Control/Lens.hs
-index f7c6548..125153e 100644
+index 7e15267..bb4d87b 100644
--- a/src/Control/Lens.hs
+++ b/src/Control/Lens.hs
-@@ -59,7 +59,7 @@ module Control.Lens
+@@ -41,7 +41,6 @@
+ ----------------------------------------------------------------------------
+ module Control.Lens
+ ( module Control.Lens.Action
+- , module Control.Lens.At
+ , module Control.Lens.Cons
+ , module Control.Lens.Each
+ , module Control.Lens.Empty
+@@ -58,7 +57,7 @@ module Control.Lens
+ , module Control.Lens.Reified
, module Control.Lens.Review
, module Control.Lens.Setter
- , module Control.Lens.Simple
-#ifndef DISABLE_TEMPLATE_HASKELL
+#if 0
, module Control.Lens.TH
#endif
, module Control.Lens.Traversal
-@@ -89,7 +89,7 @@ import Control.Lens.Reified
+@@ -69,7 +68,6 @@ module Control.Lens
+ ) where
+
+ import Control.Lens.Action
+-import Control.Lens.At
+ import Control.Lens.Cons
+ import Control.Lens.Each
+ import Control.Lens.Empty
+@@ -86,7 +84,7 @@ import Control.Lens.Prism
+ import Control.Lens.Reified
import Control.Lens.Review
import Control.Lens.Setter
- import Control.Lens.Simple
-#ifndef DISABLE_TEMPLATE_HASKELL
+#if 0
import Control.Lens.TH
#endif
import Control.Lens.Traversal
-diff --git a/src/Control/Lens/Internal/Exception.hs b/src/Control/Lens/Internal/Exception.hs
-index 387203e..bb1ca10 100644
---- a/src/Control/Lens/Internal/Exception.hs
-+++ b/src/Control/Lens/Internal/Exception.hs
-@@ -128,18 +128,6 @@ class Handleable e (m :: * -> *) (h :: * -> *) | h -> e m where
- handler_ l = handler l . const
- {-# INLINE handler_ #-}
+diff --git a/src/Control/Lens/Cons.hs b/src/Control/Lens/Cons.hs
+index a80e9c8..7d27b80 100644
+--- a/src/Control/Lens/Cons.hs
++++ b/src/Control/Lens/Cons.hs
+@@ -55,8 +55,6 @@ import Data.Vector.Unboxed (Unbox)
+ import qualified Data.Vector.Unboxed as Unbox
+ import Data.Word
--instance Handleable SomeException IO Exception.Handler where
-- handler = handlerIO
--
--instance Handleable SomeException m (CatchIO.Handler m) where
-- handler = handlerCatchIO
--
--handlerIO :: forall a r. Getting (First a) SomeException a -> (a -> IO r) -> Exception.Handler r
--handlerIO l f = reify (preview l) $ \ (_ :: Proxy s) -> Exception.Handler (\(Handling a :: Handling a s IO) -> f a)
+-{-# ANN module "HLint: ignore Eta reduce" #-}
-
--handlerCatchIO :: forall m a r. Getting (First a) SomeException a -> (a -> m r) -> CatchIO.Handler m r
--handlerCatchIO l f = reify (preview l) $ \ (_ :: Proxy s) -> CatchIO.Handler (\(Handling a :: Handling a s m) -> f a)
+ -- $setup
+ -- >>> :set -XNoOverloadedStrings
+ -- >>> import Control.Lens
+diff --git a/src/Control/Lens/Internal/Fold.hs b/src/Control/Lens/Internal/Fold.hs
+index 00e4b66..03c9cd2 100644
+--- a/src/Control/Lens/Internal/Fold.hs
++++ b/src/Control/Lens/Internal/Fold.hs
+@@ -37,8 +37,6 @@ import Data.Maybe
+ import Data.Semigroup hiding (Min, getMin, Max, getMax)
+ import Data.Reflection
+
+-{-# ANN module "HLint: ignore Avoid lambda" #-}
-
------------------------------------------------------------------------------
- -- Helpers
+ -- Folding
------------------------------------------------------------------------------
-@@ -159,21 +147,3 @@ supply = unsafePerformIO $ newIORef 0
- -- | This permits the construction of an \"impossible\" 'Control.Exception.Handler' that matches only if some function does.
- newtype Handling a s (m :: * -> *) = Handling a
+diff --git a/src/Control/Lens/Internal/Reflection.hs b/src/Control/Lens/Internal/Reflection.hs
+index bf09f2c..c9e112f 100644
+--- a/src/Control/Lens/Internal/Reflection.hs
++++ b/src/Control/Lens/Internal/Reflection.hs
+@@ -64,8 +64,6 @@ import Data.Word
+ import Data.Typeable
+ import Data.Reflection
---- the m parameter exists simply to break the Typeable1 pattern, so we can provide this without overlap.
---- here we simply generate a fresh TypeRep so we'll fail to compare as equal to any other TypeRep.
--instance Typeable (Handling a s m) where
-- typeOf _ = unsafePerformIO $ do
-- i <- atomicModifyIORef supply $ \a -> let a' = a + 1 in a' `seq` (a', a)
-- return $ mkTyConApp (mkTyCon3 "lens" "Control.Lens.Internal.Exception" ("Handling" ++ show i)) []
-- {-# INLINE typeOf #-}
--
---- The @Handling@ wrapper is uninteresting, and should never be thrown, so you won't get much benefit here.
--instance Show (Handling a s m) where
-- showsPrec d _ = showParen (d > 10) $ showString "Handling ..."
-- {-# INLINE showsPrec #-}
+-{-# ANN module "HLint: ignore Avoid lambda" #-}
-
--instance Reifies s (SomeException -> Maybe a) => Exception (Handling a s m) where
-- toException _ = SomeException HandlingException
-- {-# INLINE toException #-}
-- fromException = fmap Handling . reflect (Proxy :: Proxy s)
-- {-# INLINE fromException #-}
+ class Typeable s => B s where
+ reflectByte :: proxy s -> IntPtr
+
diff --git a/src/Control/Lens/Prism.hs b/src/Control/Lens/Prism.hs
-index 45b5cfe..88c7ff9 100644
+index 9e0bec7..0cf6737 100644
--- a/src/Control/Lens/Prism.hs
+++ b/src/Control/Lens/Prism.hs
-@@ -53,8 +53,6 @@ import Unsafe.Coerce
+@@ -59,8 +59,6 @@ import Unsafe.Coerce
import Data.Profunctor.Unsafe
#endif
@@ -170,6 +186,18 @@ index 45b5cfe..88c7ff9 100644
-- $setup
-- >>> :set -XNoOverloadedStrings
-- >>> import Control.Lens
+diff --git a/src/Control/Monad/Primitive/Lens.hs b/src/Control/Monad/Primitive/Lens.hs
+index ee942c6..2f37134 100644
+--- a/src/Control/Monad/Primitive/Lens.hs
++++ b/src/Control/Monad/Primitive/Lens.hs
+@@ -20,7 +20,6 @@ import Control.Lens
+ import Control.Monad.Primitive (PrimMonad(..))
+ import GHC.Prim (State#)
+
+-{-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-}
+
+ prim :: (PrimMonad m) => Iso' (m a) (State# (PrimState m) -> (# State# (PrimState m), a #))
+ prim = iso internal primitive
--
-1.8.5.1
+1.7.10.4