[Pkg-haskell-commits] darcs: haskell-lens: Really disable Reflection on some archs

Raúl Benencia rul at kalgan.cc
Sun Apr 20 00:55:35 UTC 2014


Sun Apr 20 00:47:36 UTC 2014  Ra[_<U+00FA>_]l Benencia <rul at kalgan.cc>
  * Really disable Reflection on some archs

    M ./changelog +7
    M ./patches/add-without-th-flag.patch -7 +8
    A ./patches/disable-reflection.patch
    M ./patches/series +1

Sun Apr 20 00:47:36 UTC 2014  Raúl Benencia <rul at kalgan.cc>
  * Really disable Reflection on some archs
diff -rN -u old-haskell-lens/changelog new-haskell-lens/changelog
--- old-haskell-lens/changelog	2014-04-20 00:55:35.414974572 +0000
+++ new-haskell-lens/changelog	2014-04-20 00:55:35.414974572 +0000
@@ -1,3 +1,10 @@
+haskell-lens (4.1.2-2) UNRELEASED; urgency=medium
+
+  * Fix bogus patch
+  * Disable Reflection on architectures without TH
+
+ -- Raúl Benencia <rul at kalgan.cc>  Sat, 19 Apr 2014 21:38:06 -0300
+
 haskell-lens (4.1.2-1) unstable; urgency=medium
 
   [ Colin Watson ]
diff -rN -u old-haskell-lens/patches/add-without-th-flag.patch new-haskell-lens/patches/add-without-th-flag.patch
--- old-haskell-lens/patches/add-without-th-flag.patch	2014-04-20 00:55:35.414974572 +0000
+++ new-haskell-lens/patches/add-without-th-flag.patch	2014-04-20 00:55:35.414974572 +0000
@@ -56,8 +56,11 @@
 -    Language.Haskell.TH.Lens
      Numeric.Lens
  
-+  cpp-options: -traditional
-+
+-  other-modules:
+-    Control.Lens.Internal.TupleIxedTH
+-
+   cpp-options: -traditional
+ 
 +  if flag(without-th)
 +    cpp-options: -DDISABLE_TEMPLATE_HASKELL
 +  else
@@ -71,11 +74,9 @@
 +      GHC.Generics.Lens
 +      Language.Haskell.TH.Lens
 +      System.IO.Error.Lens
-   other-modules:
-     Control.Lens.Internal.TupleIxedTH
- 
--  cpp-options: -traditional
--
++    other-modules:
++      Control.Lens.Internal.TupleIxedTH
++
    if flag(safe)
      cpp-options: -DSAFE=1
  
diff -rN -u old-haskell-lens/patches/disable-reflection.patch new-haskell-lens/patches/disable-reflection.patch
--- old-haskell-lens/patches/disable-reflection.patch	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-lens/patches/disable-reflection.patch	2014-04-20 00:55:35.418974571 +0000
@@ -0,0 +1,95 @@
+From: Raúl Benencia <rul at kalgan.cc>
+Date: 2014-04-19
+Description: disable Reflection on architectures without TH
+--- a/src/Control/Lens/Fold.hs
++++ b/src/Control/Lens/Fold.hs
+@@ -131,11 +131,13 @@
+   , Traversed
+   , Sequenced
+ 
++#ifndef DISABLE_TEMPLATE_HASKELL
+   -- * Fold with Reified Monoid
+   , foldBy
+   , foldByOf
+   , foldMapBy
+   , foldMapByOf
++#endif
+   ) where
+ 
+ import Control.Applicative as Applicative
+@@ -2397,6 +2399,7 @@
+ skip _ = ()
+ {-# INLINE skip #-}
+ 
++#ifndef DISABLE_TEMPLATE_HASKELL
+ ------------------------------------------------------------------------------
+ -- Folds with Reified Monoid
+ ------------------------------------------------------------------------------
+@@ -2412,3 +2415,4 @@
+ 
+ foldMapByOf :: (forall s. Getting (M r s) t a) -> (r -> r -> r) -> r -> (a -> r) -> t -> r
+ foldMapByOf l f z g = reifyFold f z (foldMapOf l (M #. g))
++#endif
+--- a/src/Control/Lens/Internal/Fold.hs
++++ b/src/Control/Lens/Internal/Fold.hs
+@@ -25,8 +25,10 @@
+   , Min(..), getMin
+   , Leftmost(..), getLeftmost
+   , Rightmost(..), getRightmost
++#ifndef DISABLE_TEMPLATE_HASKELL
+   , ReifiedMonoid(..), M(..)
+   , reifyFold
++#endif
+   ) where
+ 
+ import Control.Applicative
+@@ -35,7 +37,9 @@
+ import Data.Functor.Contravariant
+ import Data.Maybe
+ import Data.Semigroup hiding (Min, getMin, Max, getMax)
++#ifndef DISABLE_TEMPLATE_HASKELL
+ import Data.Reflection
++#endif
+ 
+ #ifndef DISABLE_TEMPLATE_HASKELL
+ {-# ANN module "HLint: ignore Avoid lambda" #-}
+@@ -212,6 +216,7 @@
+ getRightmost (RLeaf a) = Just a
+ getRightmost (RStep x) = getRightmost x
+ 
++#ifndef DISABLE_TEMPLATE_HASKELL
+ ------------------------------------------------------------------------------
+ -- Folding with Reified Monoid
+ ------------------------------------------------------------------------------
+@@ -232,3 +237,4 @@
+ 
+ reifyFold :: (a -> a -> a) -> a -> (forall s. Reifies s (ReifiedMonoid a) => t -> M a s) -> t -> a
+ reifyFold f z m xs = reify (ReifiedMonoid f z) (unM (m xs))
++#endif
+--- a/src/Control/Lens/Indexed.hs
++++ b/src/Control/Lens/Indexed.hs
+@@ -68,9 +68,11 @@
+   , iforM
+   , imapAccumR
+   , imapAccumL
++#ifndef DISABLE_TEMPLATE_HASKELL
+   -- * Indexed Folds with Reified Monoid
+   , ifoldMapBy
+   , ifoldMapByOf
++#endif
+   ) where
+ 
+ import Control.Applicative
+@@ -703,6 +705,7 @@
+ skip _ = ()
+ {-# INLINE skip #-}
+ 
++#ifndef DISABLE_TEMPLATE_HASKELL
+ -------------------------------------------------------------------------------
+ -- Indexed Folds with Reified Monoid
+ -------------------------------------------------------------------------------
+@@ -712,3 +715,4 @@
+ 
+ ifoldMapByOf :: (forall s. IndexedGetting i (M r s) t a) -> (r -> r -> r) -> r -> (i -> a -> r) -> t -> r
+ ifoldMapByOf l f z g = reifyFold f z (ifoldMapOf l (\i a -> M (g i a)))
++#endif
diff -rN -u old-haskell-lens/patches/series new-haskell-lens/patches/series
--- old-haskell-lens/patches/series	2014-04-20 00:55:35.414974572 +0000
+++ new-haskell-lens/patches/series	2014-04-20 00:55:35.418974571 +0000
@@ -3,3 +3,4 @@
 fix-doctest-path.hs
 fudge-doctest-nonascii.diff
 no-transformers-compat.diff
+disable-reflection.patch




More information about the Pkg-haskell-commits mailing list