Open dpwiz opened 1 year ago
:thinking: OTOH, the token may be in the right place if it actually used:
react entity old = \case
Just new -> insert new
Nothing -> \token -> delete entity token
I think I'm in favor of this. Although if we do, maybe it's actually better to just have a single data type so you can just use a single \case
?
data Update a
= Insert a
| Delete a
| Update a a -- Not necessarily implies a /= a!
Nothing Nothing -> pure () -- idk when this happens
So, this just happens when you call delete on something that was never there. How often that happens is up to the user, I suppose. I'm not sure if it deserves a case in Update
.
Also, I'll have to see if I can take some time to improve the Reactive haddocks, I forgot they were this terrible. I think the idea is super useful, I'd like it to be easier to use. I also think it could be moved from .Experimental
.
Currently it is:
I propose moving the old and new to the end, so they could be matched more easily by
\cases
in 9.4: