{-# LANGUAGE TemplateHaskell #-}

module Rattletrap.Type.Replay
  ( Replay(..)
  )
where

import Rattletrap.Type.Common
import Rattletrap.Type.Content
import Rattletrap.Type.Header
import Rattletrap.Type.Section

-- | A Rocket League replay.
data Replay = Replay
  { Replay -> Section Header
replayHeader :: Section Header
  -- ^ This has most of the high-level metadata.
  , Replay -> Section Content
replayContent :: Section Content
  -- ^ This has most of the low-level game data.
  } deriving (Replay -> Replay -> Bool
(Replay -> Replay -> Bool)
-> (Replay -> Replay -> Bool) -> Eq Replay
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Replay -> Replay -> Bool
$c/= :: Replay -> Replay -> Bool
== :: Replay -> Replay -> Bool
$c== :: Replay -> Replay -> Bool
Eq, Eq Replay
Eq Replay
-> (Replay -> Replay -> Ordering)
-> (Replay -> Replay -> Bool)
-> (Replay -> Replay -> Bool)
-> (Replay -> Replay -> Bool)
-> (Replay -> Replay -> Bool)
-> (Replay -> Replay -> Replay)
-> (Replay -> Replay -> Replay)
-> Ord Replay
Replay -> Replay -> Bool
Replay -> Replay -> Ordering
Replay -> Replay -> Replay
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Replay -> Replay -> Replay
$cmin :: Replay -> Replay -> Replay
max :: Replay -> Replay -> Replay
$cmax :: Replay -> Replay -> Replay
>= :: Replay -> Replay -> Bool
$c>= :: Replay -> Replay -> Bool
> :: Replay -> Replay -> Bool
$c> :: Replay -> Replay -> Bool
<= :: Replay -> Replay -> Bool
$c<= :: Replay -> Replay -> Bool
< :: Replay -> Replay -> Bool
$c< :: Replay -> Replay -> Bool
compare :: Replay -> Replay -> Ordering
$ccompare :: Replay -> Replay -> Ordering
$cp1Ord :: Eq Replay
Ord, Int -> Replay -> ShowS
[Replay] -> ShowS
Replay -> String
(Int -> Replay -> ShowS)
-> (Replay -> String) -> ([Replay] -> ShowS) -> Show Replay
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Replay] -> ShowS
$cshowList :: [Replay] -> ShowS
show :: Replay -> String
$cshow :: Replay -> String
showsPrec :: Int -> Replay -> ShowS
$cshowsPrec :: Int -> Replay -> ShowS
Show)

$(deriveJson ''Replay)