Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- knownTournaments :: [(Text, Tournament TMany)]
- knownTournamentsLen :: Int
- data MenuForm = MenuForm {
- tournament :: !Int
- playerCount :: !Text
- data AppState = AppState {}
- data TournamentState = TournamentState {
- tournament :: Tournament TMany
- selection :: !Selection
- matches :: MapByRound (MapByMatches (Maybe Result))
- roundNo :: !RoundNo
- pendingMatches :: Vector Match
- pureMatches :: MapByRound (MapByMatches (Maybe Result))
- pureCode :: Code
- codeSoFar :: Vector (TourneyOp, StepCodeEvent)
- rawEvents :: Vector StepCodeEvent
- standingsHistory :: MapByRound StandingsUpdate
- vm :: !VM
- playerCount :: !PlayerCount
- colours :: !(Array Player (Colour Double))
- tournamentViewportScroll :: !(Int, Int)
- matchForm :: Maybe (Form MatchForm AppEvent AppResourceName)
- data MatchForm = MatchForm {}
- data AppResourceName
- type UIElement = Reader TournamentState (Widget AppResourceName)
- data AppEvent
- main :: IO AppState
- data DialogChoice = DialogEnter
- menuDialog :: Dialog DialogChoice AppResourceName
- menuForm :: MenuForm -> Form MenuForm AppEvent AppResourceName
- drawMenu :: Reader AppState (Widget AppResourceName)
- beginTournament :: EventM AppResourceName AppState ()
- drawErrors :: [Text] -> [Widget AppResourceName]
- handleTournamentEvent :: BrickEvent AppResourceName AppEvent -> EventM AppResourceName TournamentState ()
- createTournamentState :: PlayerCount -> Tournament TMany -> IO TournamentState
- advanceRound :: EventM AppResourceName TournamentState ()
- quickAssignResult :: Result -> EventM AppResourceName TournamentState ()
- acceptMatchFormEntry :: EventM AppResourceName TournamentState ()
- parsePoints :: Text -> MaybeT (EventM AppResourceName s) Points
- createMatchForm :: EventM AppResourceName TournamentState (Maybe MatchForm)
- drawMain :: Reader TournamentState [Widget AppResourceName]
- niceBorder :: Widget a -> Widget a
- drawCode :: UIElement
- drawEvents :: UIElement
- drawPendings :: UIElement
- drawSelectedMatch :: Reader TournamentState (Maybe (Widget AppResourceName))
- matchForm :: MatchForm -> Form MatchForm AppEvent AppResourceName
- drawHelp :: UIElement
- helpText :: Text -> Widget n
- drawTournament :: UIElement
- codeRealAttr :: AttrName
- codePureAttr :: AttrName
- helpAttr :: AttrName
- helpKeyAttr :: AttrName
- stepCodeAttr :: AttrName
- lostPlayerAttr :: AttrName
- winPlayerAttr :: AttrName
- rowOddAttr :: AttrName
- rowEvenAttr :: AttrName
- dim :: Color
- dimRed :: Color
- makeMatchColours :: PlayerCount -> Array Player (Colour Double)
- toVtyRGB :: Colour Double -> Color
- getMatchAttr :: PlayerCount -> Array Player (Colour Double) -> (Slot, Maybe Player) -> (Slot, Maybe Player) -> Slot -> Attr
- chunksOf :: Int -> [e] -> [[e]]
Documentation
knownTournaments :: [(Text, Tournament TMany)] Source #
MenuForm | |
|
Instances
Generic MenuForm Source # | |
type Rep MenuForm Source # | |
Defined in Tourney.UI.Main type Rep MenuForm = D1 ('MetaData "MenuForm" "Tourney.UI.Main" "journeyman-0.1.0.0-inplace" 'False) (C1 ('MetaCons "MenuForm" 'PrefixI 'True) (S1 ('MetaSel ('Just "tournament") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "playerCount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) |
AppState | |
|
Instances
Generic AppState Source # | |
type Rep AppState Source # | |
Defined in Tourney.UI.Main type Rep AppState = D1 ('MetaData "AppState" "Tourney.UI.Main" "journeyman-0.1.0.0-inplace" 'False) (C1 ('MetaCons "AppState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "menu") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Form MenuForm AppEvent AppResourceName)) :*: S1 ('MetaSel ('Just "dialog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Dialog DialogChoice AppResourceName))) :*: (S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe TournamentState)) :*: S1 ('MetaSel ('Just "errors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text])))) |
data TournamentState Source #
TournamentState | |
|
Instances
Instances
Generic MatchForm Source # | |
type Rep MatchForm Source # | |
Defined in Tourney.UI.Main type Rep MatchForm = D1 ('MetaData "MatchForm" "Tourney.UI.Main" "journeyman-0.1.0.0-inplace" 'False) (C1 ('MetaCons "MatchForm" 'PrefixI 'True) (S1 ('MetaSel ('Just "score1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "score2") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) |
data AppResourceName Source #
Tournament | |
CodeStream | |
EventStream | |
Panel | |
ScrollBar ClickableScrollbarElement AppResourceName | |
MenuTournamentItem !Int | |
MenuPlayerCountItem | |
MenuStandingsItem | |
MenuEnter | |
Score1 | |
Score2 |
Instances
Show AppResourceName Source # | |
Defined in Tourney.UI.Main | |
Eq AppResourceName Source # | |
Defined in Tourney.UI.Main (==) :: AppResourceName -> AppResourceName -> Bool Source # (/=) :: AppResourceName -> AppResourceName -> Bool Source # | |
Ord AppResourceName Source # | |
Defined in Tourney.UI.Main compare :: AppResourceName -> AppResourceName -> Ordering Source # (<) :: AppResourceName -> AppResourceName -> Bool Source # (<=) :: AppResourceName -> AppResourceName -> Bool Source # (>) :: AppResourceName -> AppResourceName -> Bool Source # (>=) :: AppResourceName -> AppResourceName -> Bool Source # max :: AppResourceName -> AppResourceName -> AppResourceName Source # min :: AppResourceName -> AppResourceName -> AppResourceName Source # |
type UIElement = Reader TournamentState (Widget AppResourceName) Source #
Instances
Show AppEvent Source # | |
Eq AppEvent Source # | |
Ord AppEvent Source # | |
Defined in Tourney.UI.Main |
drawErrors :: [Text] -> [Widget AppResourceName] Source #
handleTournamentEvent :: BrickEvent AppResourceName AppEvent -> EventM AppResourceName TournamentState () Source #
parsePoints :: Text -> MaybeT (EventM AppResourceName s) Points Source #
niceBorder :: Widget a -> Widget a Source #
makeMatchColours :: PlayerCount -> Array Player (Colour Double) Source #
getMatchAttr :: PlayerCount -> Array Player (Colour Double) -> (Slot, Maybe Player) -> (Slot, Maybe Player) -> Slot -> Attr Source #
chunksOf :: Int -> [e] -> [[e]] Source #
chunksOf function taken from the "split" package by Brent Yorgey 2008-2023 - licensed BSD-3
Copyright (c) 2008 Brent Yorgey, Louis Wasserman
All rights reserved.
Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the author nor the names of other contributors - may be used to endorse or promote products derived from this software - without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE.