dsorokin / aivika

A multi-method simulation library
Other
79 stars 4 forks source link

Add missing semigroup instances #3

Closed larskuhtz closed 6 years ago

larskuhtz commented 6 years ago

Makes the library compile with GHC 8.4

dsorokin commented 6 years ago

Thanks Lars for pointing to the issue with new GHC 8.4. I'll consider your patch soon.

Best regards, David Sorokin

dsorokin commented 6 years ago

Hi! I receive compilation errors like this:

Simulation/Aivika/Internal/Event.hs:433:13: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Data.Monoid.<>’,
                             imported from ‘Data.Monoid’ at Simulation/Aivika/Internal/Event.hs:63:1-18
                          or ‘Data.Semigroup.<>’,
                             imported from ‘Data.Semigroup’ at Simulation/Aivika/Internal/Event.hs:64:24-36

Here I tested with GHC 8.2.2

larskuhtz commented 6 years ago

Oops, yes, (<>) has conflicting definitions in previous versions of base. I think, (<>) must be either hidden in the import of Data.Monoid or, the import of Data.Monoid can be omitted at all, since, Data.Semigroup redefines or reexport most of it. But there are some inconsistencies in the definition of instances for Last and First, so the later does not always work.

I'll take a look and update the PR.

dsorokin commented 6 years ago

Please no need in travis. I test manually

larskuhtz commented 6 years ago

I am happy, to remove the travis file when this PR is ready to go in. I don't have a setup for testing older versions of GHC locally, so I use it for testing this PR.

dsorokin commented 6 years ago

Please remake your pull request for new branch feature/ghc-8-4-support by including the first two commits only (without travis). I will resolve the compilation issues myself. Please do the same for aivika-transformers as well.

P.S. It is easy to repeat the commits by using command git cherry-pick <commit-hash> in the desired branch. I could do it myself, but I don't see your commits in my own repository.