Skip to content

Commit 885a894

Browse files
committed
Honestly get instances from Data.Orphans
Do this instead of sneakily getting them via monoidal-map.
1 parent 9cb3030 commit 885a894

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

patch.cabal

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ library
4343
, transformers >= 0.5.6.0 && < 0.6
4444
, witherable >= 0.3 && < 0.4
4545

46+
if impl(ghc < 8.6) -- really, if base < 8.12
47+
build-depends: base-orphans >= 0.8 && < 0.9
48+
4649
exposed-modules: Data.Functor.Misc
4750
, Data.Monoid.DecidablyEmpty
4851
, Data.Patch

src/Data/Semigroup/Additive.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ module Data.Semigroup.Additive
1313

1414
import Data.Functor.Const (Const (..))
1515
import Data.Functor.Identity
16-
-- For base-orphans, TODO don't cheat.
17-
import Data.Map.Monoidal ()
1816
import Data.Proxy
17+
#if !MIN_VERSION_base(4,12,0)
18+
-- for :*: and :.: semigroup instances
19+
import Data.Orphans ()
20+
#endif
1921
#if !MIN_VERSION_base(4,11,0)
2022
import Data.Semigroup (Semigroup (..))
2123
#endif

0 commit comments

Comments
 (0)