ewestern / geos

This is a Haskell binding to Geos, the open-source geometry library
MIT License
13 stars 9 forks source link

Support for Semigroup-Monoid proposal #26

Closed ned closed 5 years ago

ned commented 5 years ago

GHC 8.4 implements the Semigroup-Monoid proposal which makes Semigroup a superclass of Monoid. In GHC 8.4 I get this error:

src/Data/Geometry/Geos/Types.hs:70:10: error:
       • No instance for (Semigroup LinearRing)
            arising from the superclasses of an instance declaration
        • In the instance declaration for ‘Monoid LinearRing’
       |
    70 | instance Monoid LinearRing where
       |          ^^^^^^^^^^^^^^^^^

Which corresponds to this declaration https://github.com/ewestern/geos/blob/e9cff92e6b583a2b385764b2b24ce46acedc752b/src/Data/Geometry/Geos/Geometry.hs#L100-L102

The wiki has suggestions for writing compatible code.

ewestern commented 5 years ago

Thanks much for the heads-up! https://github.com/ewestern/geos/commit/aa196ae6a5b4912dfdd5e01ba380d897419e40a6