Skip to content
Permalink
Browse files

Add emptyState function

  • Loading branch information...
palas committed Apr 11, 2019
1 parent df6b3d7 commit c2f83a50950f3e2e604992f329aae32476ec332e
Showing with 15 additions and 0 deletions.
  1. +15 −0 semantics-2.0/Semantics.hs
@@ -88,6 +88,21 @@ data State = State { commits :: CommitInfo
, usedIds :: S.Set IdAction}
deriving (Eq,Ord,Show,Read)

emptyCommitInfo :: CommitInfo
emptyCommitInfo = CommitInfo { redeemedPerPerson = M.empty
, currentCommitsById = M.empty
, expiredCommitIds = S.empty
, timeoutData = M.empty
}

emptyState :: State
emptyState = State { commits = emptyCommitInfo
, choices = M.empty
, oracles = M.empty
, usedIds = S.empty
}


-- Adds a commit identifier to the timeout data map
addToCommByTim :: Timeout -> IdCommit -> TimeoutData -> TimeoutData
addToCommByTim timeout idCommit timData =

0 comments on commit c2f83a5

Please sign in to comment.
You can’t perform that action at this time.