ekmett / hkd

higher-kinded data
Other
30 stars 2 forks source link

Build failure with `some-1.0.4` or later #7

Closed RyanGlScott closed 1 year ago

RyanGlScott commented 1 year ago

some-1.0.4 defines GEq instances for (:+:) and (:*:), which clash with the orphan instances defined in hkd:

$ cabal build -w ghc-8.10 --constraint="some==1.0.4.*"
HEAD is now at 972c974 Fix unused import warnings with base-4.18.* (GHC 9.6)
HEAD is now at e1eae75 Allow building with transformers-0.6.*
HEAD is now at e42900a Use PolyKinds instead of TypeInType
HEAD is now at a581755 typo (#72)
HEAD is now at 1e86b98 silence hlint
HEAD is now at b721d72 Fix unused import warnings with base-4.18.* (GHC 9.6)
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
 - hkd-0.2 (lib) (first run)
Preprocessing library for hkd-0.2..
Building library for hkd-0.2..
[ 4 of 10] Compiling Data.HKD.Orphans ( src/Data/HKD/Orphans.hs, /home/ryanglscott/Documents/Hacking/Haskell/hkd/dist-newstyle/build/x86_64-linux/ghc-8.10.7/hkd-0.2/build/Data/HKD/Orphans.o, /home/ryanglscott/Documents/Hacking/Haskell/hkd/dist-newstyle/build/x86_64-linux/ghc-8.10.7/hkd-0.2/build/Data/HKD/Orphans.dyn_o )

src/Data/HKD/Orphans.hs:100:10: error:
    Duplicate instance declarations:
      instance forall k (f :: k -> Type) (g :: k -> Type).
               (GEq f, GEq g) =>
               GEq (f :+: g)
        -- Defined at src/Data/HKD/Orphans.hs:100:10
      instance [safe] forall k (f :: k -> Type) (g :: k -> Type).
                      (GEq f, GEq g) =>
                      GEq (f :+: g)
        -- Defined in ‘some-1.0.4.1:Data.GADT.Internal’
    |
100 | instance (GEq f, GEq g) => GEq (f :+: g) where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/HKD/Orphans.hs:109:10: error:
    Duplicate instance declarations:
      instance forall k (f :: k -> Type) (g :: k -> Type).
               (GEq f, GEq g) =>
               GEq (f :*: g)
        -- Defined at src/Data/HKD/Orphans.hs:109:10
      instance [safe] forall k (a :: k -> Type) (b :: k -> Type).
                      (GEq a, GEq b) =>
                      GEq (a :*: b)
        -- Defined in ‘some-1.0.4.1:Data.GADT.Internal’
    |
109 | instance (GEq f, GEq g) => GEq (f :*: g) where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RyanGlScott commented 1 year ago

Resolved in acf606dd024b63fa8123df1388e76dc0152dcee1.