lpsmith / postgresql-simple

Mid-level client library for accessing PostgreSQL from Haskell
Other
206 stars 71 forks source link

Duplicate instance for IsString Blaze.Builder in GenTypeInfo.hs #234

Closed MaxGabriel closed 6 years ago

MaxGabriel commented 6 years ago

When running tools/GenTypeInfo.hs I get the following error:

maximiliantagher@Maximilians-MacBook-Pro ~/D/C/H/p/tools> stack script GenTypeInfo.hs --resolver="lts-9.14"
Using resolver: lts-9.14 specified on command line

GenTypeInfo.hs:200:10: error:
    Duplicate instance declarations:
      instance IsString Blaze.Builder -- Defined at GenTypeInfo.hs:200:10
      instance IsString Blaze.Builder
        -- Defined in ‘Data.ByteString.Builder’

I'm guessing that it was added in a later version, and the correct solution is to just remove the instance, since everyone running the script can use the latest version?

lpsmith commented 6 years ago

Probably, but keep in mind GenTypeInfo doesn't have to be run very often.

MaxGabriel commented 6 years ago

Ok, I think that this comes from Blaze's bytestring builder being moved into data.bytestring.builder. Since this file is still using blaze's builder module, I'll just leave this code in place absent a rewrite to Data.ByteString.Builder.