File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ source-repository head
2222library
2323 exposed-modules : Data.Group
2424 -- other-modules:
25- build-depends : base >= 4.6 && < 5
26- , commutative-semigroups >= 0.0 && < 0.1
2725 hs-source-dirs : src
2826 default-language : Haskell2010
27+
28+ build-depends : base >= 4.6 && < 5
29+ , commutative-semigroups >= 0.0 && < 0.1
30+
31+ if impl(ghc < 8.6 ) -- really, if base < 8.12
32+ build-depends : base-orphans >= 0.8 && < 0.9
Original file line number Diff line number Diff line change @@ -171,7 +171,6 @@ instance Cyclic a => Cyclic (Identity a) where
171171-- (:*:) and (:.:) exist since base-4.6.0.0 but the Monoid instances
172172-- arrive in base-4.12.0.0.
173173-- Also, contravariant was moved into base in this version.
174- #if MIN_VERSION_base(4,12,0)
175174-- | Product of groups, Functor style.
176175instance (Group (f a ), Group (g a )) => Group ((f :*: g ) a ) where
177176 invert (a :*: b) = invert a :*: invert b
@@ -184,6 +183,7 @@ instance Group (f (g a)) => Group ((f :.: g) a) where
184183 invert (Comp1 xs) = Comp1 (invert xs)
185184 Comp1 xs ~~ Comp1 ys = Comp1 (xs ~~ ys)
186185
186+ #if MIN_VERSION_base(4,12,0)
187187instance Group a => Group (Op a b ) where
188188 invert (Op f) = Op (invert f)
189189 pow (Op f) n = Op (\ e -> pow (f e) n)
You can’t perform that action at this time.
0 commit comments