dsorokin / aivika

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

Semigroup instances #4

Closed larskuhtz closed 6 years ago

larskuhtz commented 6 years ago

Same PR as #3, but this time against feature/ghc-8-4-support.

dsorokin commented 6 years ago

Thanks Lars! Now I need to test with other libraries. They also use (<>). I hope it will work without preprocessor pragmas.

larskuhtz commented 6 years ago

My understanding is that the recommended way to avoid CPP in this case is to use the semigroups package and let it take care of backward compatibility. Yet, as the different versions of the PR showed, it's not completely straight forward. The issue is the conflicting versions of (<>) (same semantics), and First and Last (different semantics) between Semigroup and Monoid.

larskuhtz commented 6 years ago

By the way, many thanks for this great library and its documentation!