Conversation
|
Are we sure we want to remove it? I'm using it on my branch to distinguish between Simple and Full tables. |
I don't think there is much of a benefit. Sure, you could now create a table from the |
If you create a table from |
If we want to remove this, we should either rewrite the codebase so that the monoid is only ever used in mupserts, or at very least test that switching between the full and simple APIs doesn't alter the semantics using the state machine tests. |
This you could do with just the
I'm not sure I understand what you mean here. Could you elaborate? |
|
FYI, one idea would be reify the monoid as a datatype, and only allow a small set of monoids. We would then store this datatype in a table/snapshot so that the monoid can't be changed. data ResolveMethod = Sum | Const | Subtract | ...And we could even allow custom monoids still, but then we'll have to warn the user that the implementation doesn't check whether the monoid has changed unexpectedly, e.g.: data ResolveMethod v = Sum | Const | Subtract | Custom v -- WARNING |
The monoid is derived from a type class, so switching the monoid should at least require switching orphan instances, at which point you must be aware you're doing something very wrong, since you could easily break, say, Data.Map that way as well. |
|
|
I'm fine with keeping the snapshot table type, but I think it just does not help very much with the fundamental problem: making sure that a snapshot isn't opened at the wrong Haskell types for keys/values/blobs (and therefore monoid and serialisation functions)
I think it's easier to break than that: you can open the same snapshot using different types (with different monoids). Or you've upgraded a dependency and something changed unexpectedly in the We already have
The only difference between public APIs is which
I'm not sure what you mean here by "to purge". The constraint only exists at the public API, inside the internals it is only a |
Any sense in replacing From @dcoutts: They're unstable across GHC versions. |
|
@jorisdral: With special cases for |
|
Superseded by #707 |
No description provided.