mgsloan / store

Fast binary serialization in Haskell
MIT License
109 stars 35 forks source link

Duplicate instances? #138

Closed qrilka closed 5 years ago

qrilka commented 5 years ago

Using a fresh pull (with 6e257c8e91f85a14aa0d5f7bb9ded60258d79b89 currently) stack build fails with

    [4 of 9] Compiling Data.Store.Internal ( src/Data/Store/Internal.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/build/Data/Store/Internal.o )

    /home/qrilka/ws/h/store/src/Data/Store/Internal.hs:691:10: error:
        Duplicate instance declarations:
          instance (Store a, Store b) => Store (Either a b)
            -- Defined at src/Data/Store/Internal.hs:691:10
          instance (Store a, Store b) => Store (Either a b)
            -- Defined at src/Data/Store/Internal.hs:698:3
        |
    691 | instance (Store a, Store b) => Store (Either a b)
        | 

is it something expected? The code under question doesn't look to be new and I don't understand how could it be that way (with 2 instances for Either)

mgsloan commented 5 years ago

Oops, my mistake. Looks like the cherrypick of the commit from my fork went wrong - the cherrypicked commit doesn't have the removal of the old instance.

Fixed in https://github.com/fpco/store/commit/423fede2931c060631005f7cd96c9a1ac7ca0c61