-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sut): Dumblog add versions in the journal of which state-machine…
… to run
- Loading branch information
1 parent
0a248a3
commit a00ca8b
Showing
9 changed files
with
53 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
module Dumblog.Journal.Logger where | ||
|
||
import Data.Foldable | ||
import Data.Int | ||
import Data.IORef | ||
import Data.Sequence | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Dumblog.Journal.Versions.Codec where | ||
|
||
import Data.Int(Int64) | ||
|
||
import Dumblog.Journal.Logger (Logger) | ||
import Dumblog.Journal.Types (Command, Response) | ||
import Dumblog.Journal.StateMachine(InMemoryDumblog) | ||
import qualified Dumblog.Journal.StateMachine as SM | ||
|
||
runCommand :: Int64 -> Logger -> InMemoryDumblog -> Command -> IO (InMemoryDumblog, Response) | ||
runCommand 1 = SM.runCommand True | ||
-- this line will be added in demo! | ||
-- runCommand 2 = SM.runCommand False | ||
runCommand v = \_ _ cmd -> error ("Don't know how to run the command: " <> show cmd <> " in version: " <> show v) |
This file contains 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