Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Tourney.VM.Interpret
Synopsis
- newtype IStateVar = IStateVar {}
- data IState = IState {
- roundDepth :: !Int
- roundNo :: !RoundNo
- matrix :: !MatchMatrix
- standings :: !(Vector (Points, Player))
- history :: !(MapByRound StandingsUpdate)
- createIState :: PlayerCount -> STM IStateVar
- data StandingsUpdate = StandingsUpdate {}
- data StepContinue
- = NeedResults'Sorting !RoundNo !(Vector Match)
- | NeedResults'EndRound !RoundNo !(Vector Match)
- | Continue !StepInfo
- tryRunStep :: IStateVar -> TourneyOp -> STM StepContinue
Setting up an interpreter
Interpreter state
Constructors
IState | |
Fields
|
Instances
Generic IState Source # | |
type Rep IState Source # | |
Defined in Tourney.VM.Interpret type Rep IState = D1 ('MetaData "IState" "Tourney.VM.Interpret" "journeyman-0.1.0.0-inplace" 'False) (C1 ('MetaCons "IState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "roundDepth") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "roundNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RoundNo)) :*: (S1 ('MetaSel ('Just "matrix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MatchMatrix) :*: (S1 ('MetaSel ('Just "standings") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector (Points, Player))) :*: S1 ('MetaSel ('Just "history") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (MapByRound StandingsUpdate)))))) |
createIState :: PlayerCount -> STM IStateVar Source #
Looking at updates
data StandingsUpdate Source #
Constructors
StandingsUpdate | |
Instances
Running it
data StepContinue Source #
Constructors
NeedResults'Sorting !RoundNo !(Vector Match) | |
NeedResults'EndRound !RoundNo !(Vector Match) | |
Continue !StepInfo |
Instances
Show StepContinue Source # | |
Defined in Tourney.VM.Interpret | |
Eq StepContinue Source # | |
Defined in Tourney.VM.Interpret Methods (==) :: StepContinue -> StepContinue -> Bool Source # (/=) :: StepContinue -> StepContinue -> Bool Source # |
tryRunStep :: IStateVar -> TourneyOp -> STM StepContinue Source #
Run a step