Last active
March 2, 2017 19:30
-
-
Save hanshoglund/c1b71fe27800f8c33bfc2cf15e471a27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type TransId = Integer | |
data State -- AffineSpace wh Diff is just a Monoid (name?), Diff State ~ Trans | |
data Trans -- Monoid | |
data Query -- JoinSemilattice | |
runTrans :: Trans -> State -> State -- modifies the state arbitrarily | |
runQuery :: Query -> State -> State -- selects a subset of the state | |
forceCommit :: Trans -> m Bool | |
tryCommit :: TransId -> Trans -> m Bool | |
lastTrans :: m TransId | |
query :: TransId -> Query -> State | |
-- Relation to get/set and lenses | |
-- Query as Getter (s -> a) | |
-- Trans as Setter (s -> b -> t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment