summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConalElliott <>2016-05-31 15:45:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2016-05-31 15:45:00 (GMT)
commit4efc31d6179e6c79f5f875770e0709a31bf23223 (patch)
treee553c27c2b8971163f543ac01234c1a411c1496e
parent0ae453c01c65fc7cb7d7533ab4596f456d01fb51 (diff)
version 0.9.120.9.12
-rw-r--r--TypeCompose.cabal2
-rw-r--r--src/Control/Compose.hs29
2 files changed, 28 insertions, 3 deletions
diff --git a/TypeCompose.cabal b/TypeCompose.cabal
index cea3f1a..1b8aa89 100644
--- a/TypeCompose.cabal
+++ b/TypeCompose.cabal
@@ -1,5 +1,5 @@
Name: TypeCompose
-Version: 0.9.11
+Version: 0.9.12
Synopsis: Type composition classes & instances
Category: Composition, Control
Cabal-Version: >= 1.6
diff --git a/src/Control/Compose.hs b/src/Control/Compose.hs
index 41941ea..264e8fc 100644
--- a/src/Control/Compose.hs
+++ b/src/Control/Compose.hs
@@ -3,6 +3,9 @@
, TypeOperators, GeneralizedNewtypeDeriving, StandaloneDeriving
, CPP
#-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# Language DeriveGeneric #-}
+#endif
-- For ghc 6.6 compatibility
-- {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-}
@@ -64,6 +67,14 @@ module Control.Compose
, biEndo, inEndo
) where
+
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+import GHC.Generics ( Generic )
+#endif
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 706
+import GHC.Generics ( Generic1 )
+#endif
+
#if __GLASGOW_HASKELL__ >= 609
import Control.Category
import Prelude hiding ((.), id)
@@ -203,7 +214,14 @@ someday Haskell will do Prolog-style search for instances, subgoaling the
constraints, rather than just matching instance heads.
-}
-newtype (g :. f) a = O (g (f a)) deriving (Eq,Show)
+newtype (g :. f) a = O (g (f a)) deriving ( Eq, Show, Ord
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+ , Generic
+#endif
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 706
+ , Generic1
+#endif
+ )
-- newtype (g :. f) a = O { unO :: g (f a) } deriving Show
@@ -638,7 +656,14 @@ instance (Applicative f, Monoid m) => Monoid (App f m) where
-- | Identity type constructor. Until there's a better place to find it.
-- I'd use "Control.Monad.Identity", but I don't want to introduce a
-- dependency on mtl just for Id.
-newtype Id a = Id a deriving Show
+newtype Id a = Id a deriving ( Eq, Show, Ord
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+ , Generic
+#endif
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 706
+ , Generic1
+#endif
+ )
-- Could define record field:
--