turion / time-domain

MIT License
2 stars 0 forks source link

Consider using monoid action #8

Open turion opened 1 year ago

turion commented 1 year ago

Time differences act on times as a monoid action: https://hackage.haskell.org/package/monoid-extras-0.6.1/docs/Data-Monoid-Action.html

In fact, they do a bit more than that. The action is invertible because we can take the difference of two timestamps. So it's a transitive group action. There exists a group package: https://hackage.haskell.org/package/groups but there is no action class, and no transitivity.

turion commented 1 year ago

See https://github.com/Taneb/groups/issues/15

turion commented 1 year ago

https://github.com/diagrams/monoid-extras/issues/53

turion commented 1 year ago

Other possibilities of modelling the difference of timestamp differences might be https://hackage.haskell.org/package/monoid-subclasses-1.2.3/docs/Data-Semigroup-Cancellative.html#t:LeftReductive