Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- slHead :: SortedList a -> a
- data PlayedGame c s m = PlayedGame {
- _gameExtra :: !m
- _gameSorted :: !(SortedList (s, c))
- gameSorted :: forall c s m c s. Lens (PlayedGame c s m) (PlayedGame c s m) (SortedList (s, c)) (SortedList (s, c))
- gameExtra :: forall c s m m. Lens (PlayedGame c s m) (PlayedGame c s m) m m
- data Bracket c s m = Bracket {
- _bPlayed :: ![[PlayedGame c s m]]
- _bUpcoming :: ![[c]]
- _bCurrent :: !(Maybe (PlayedGame c s m))
- class HasBracket c c s m | c -> c s m where
- data KuritaGame = KGame {
- _kgEndTime :: !UTCTime
- _kgCommentary :: [(UTCTime, Text)]
- kgEndTime :: Lens' KuritaGame UTCTime
- kgCommentary :: Lens' KuritaGame [(UTCTime, Text)]
- changeVoteType :: (Ord c, Ord s2) => (s1 -> s2) -> Bracket c s1 a -> Bracket c s2 a
- seedBracket :: (Ord c, Ord s, Monoid s) => ([c] -> m) -> (Int -> [c] -> m) -> [c] -> Bracket c s m
- finishGame :: (Ord c, Ord s, Monoid s) => ([c] -> m) -> (Int -> [c] -> m) -> Bracket c s m -> Bracket c s m
- upToGame :: (Ord c, Ord s, Monoid s) => ([c] -> m) -> [c] -> PlayedGame c s m
- addScores :: (Ord c, Ord s, Semigroup s) => [(c, s)] -> Bracket c s a -> Bracket c s a
- addScore :: (Ord c, Reifies p Integer) => c -> Word32 -> Bracket c (HyperLogLog p) a -> Bracket c (HyperLogLog p) a
- data ClientGame = CGame {
- _cgEndTime :: !UTCTime
- _cgCommentary :: [Text]
- k2cGame :: KuritaGame -> ClientGame
- data TDown c
- = BattleStart {
- tdBrackets :: Bracket c Int64 ClientGame
- | ScoreUpdate [(c, Int64)]
- = BattleStart {
- data TUp c = Vote c
- data RUp hllsz c = Votes [(c, HyperLogLog hllsz)]
- decodeHLL :: Reifies p Integer => Value -> Parser (HyperLogLog p)
Documentation
slHead :: SortedList a -> a Source #
data PlayedGame c s m Source #
Who played in a game, the score they got, sorted in score order.
PlayedGame | |
|
Instances
gameSorted :: forall c s m c s. Lens (PlayedGame c s m) (PlayedGame c s m) (SortedList (s, c)) (SortedList (s, c)) Source #
gameExtra :: forall c s m m. Lens (PlayedGame c s m) (PlayedGame c s m) m m Source #
Bracket | |
|
Instances
Functor (Bracket c s) Source # | |
(Eq m, Eq s, Eq c) => Eq (Bracket c s m) Source # | |
(Ord m, Ord s, Ord c) => Ord (Bracket c s m) Source # | |
Defined in Kurita.Protocol compare :: Bracket c s m -> Bracket c s m -> Ordering # (<) :: Bracket c s m -> Bracket c s m -> Bool # (<=) :: Bracket c s m -> Bracket c s m -> Bool # (>) :: Bracket c s m -> Bracket c s m -> Bool # (>=) :: Bracket c s m -> Bracket c s m -> Bool # | |
(Show m, Show s, Show c) => Show (Bracket c s m) Source # | |
(ToJSON c, ToJSON s, ToJSON m) => ToJSON (Bracket c s m) Source # | |
Defined in Kurita.Protocol | |
(FromJSON c, FromJSON s, FromJSON m, Ord c, Ord s) => FromJSON (Bracket c s m) Source # | |
HasBracket (Bracket c s m) c s m Source # | |
class HasBracket c c s m | c -> c s m where Source #
bracket :: Lens' c (Bracket c s m) Source #
bCurrent :: Lens' c (Maybe (PlayedGame c s m)) Source #
bPlayed :: Lens' c [[PlayedGame c s m]] Source #
Instances
HasBracket (Bracket c s m) c s m Source # | |
data KuritaGame Source #
KGame | |
|
Instances
kgCommentary :: Lens' KuritaGame [(UTCTime, Text)] Source #
seedBracket :: (Ord c, Ord s, Monoid s) => ([c] -> m) -> (Int -> [c] -> m) -> [c] -> Bracket c s m Source #
finishGame :: (Ord c, Ord s, Monoid s) => ([c] -> m) -> (Int -> [c] -> m) -> Bracket c s m -> Bracket c s m Source #
Finishes the current game and start the next, generating a new round if need be, or finishing the game if this was the last round.
addScore :: (Ord c, Reifies p Integer) => c -> Word32 -> Bracket c (HyperLogLog p) a -> Bracket c (HyperLogLog p) a Source #
data ClientGame Source #
CGame | |
|
Instances
k2cGame :: KuritaGame -> ClientGame Source #
BattleStart | |
| |
ScoreUpdate [(c, Int64)] |
Vote c |
Votes [(c, HyperLogLog hllsz)] |
Orphan instances
Reifies p Integer => Ord (HyperLogLog p) Source # | |
compare :: HyperLogLog p -> HyperLogLog p -> Ordering # (<) :: HyperLogLog p -> HyperLogLog p -> Bool # (<=) :: HyperLogLog p -> HyperLogLog p -> Bool # (>) :: HyperLogLog p -> HyperLogLog p -> Bool # (>=) :: HyperLogLog p -> HyperLogLog p -> Bool # max :: HyperLogLog p -> HyperLogLog p -> HyperLogLog p # min :: HyperLogLog p -> HyperLogLog p -> HyperLogLog p # |