-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Readable HaxBall replays -- -- Provides an interface for parsing HaxBall replays. @package haxparse @version 0.1.0.0 module HaxParse.AST.TH makeIsFns :: Name -> Q [Dec] makeIsFn :: Con -> Q [Dec] module HaxParse.AST data Move Nop :: Move Move :: [Direction] -> Move Kick :: Move MoveKick :: [Direction] -> Move data Direction Up :: Direction Left :: Direction Down :: Direction Right :: Direction data Action Action :: Key -> Word32 -> Event -> Action actPlayerId :: Action -> Key actFrameCount :: Action -> Word32 actEvent :: Action -> Event data Side Red :: Side Blue :: Side Spec :: Side data Event NewPlayer :: Key -> ByteString -> Bool -> ByteString -> Event npId :: Event -> Key npName :: Event -> ByteString npAdmin :: Event -> Bool npCountry :: Event -> ByteString Departure :: Word32 -> Bool -> Bool -> Maybe ByteString -> Event dId :: Event -> Word32 kicked :: Event -> Bool banned :: Event -> Bool reason :: Event -> Maybe ByteString ChangeAvatar :: ByteString -> Event Chat :: ByteString -> Event StartMatch :: Event StopMatch :: Event TeamChange :: Word32 -> Side -> Event DiscMove :: Move -> Event PingBroadcast :: [(Word32, Word8)] -> Event TimeUpdate :: Event isTimeUpdate :: Event -> Bool isPingBroadcast :: Event -> Bool isDiscMove :: Event -> Bool isTeamChange :: Event -> Bool isStopMatch :: Event -> Bool isStartMatch :: Event -> Bool isChat :: Event -> Bool isChangeAvatar :: Event -> Bool isDeparture :: Event -> Bool isNewPlayer :: Event -> Bool data Stadium Classic :: Stadium Easy :: Stadium Small :: Stadium Big :: Stadium Rounded :: Stadium Hockey :: Stadium BigHockey :: Stadium BigEasy :: Stadium BigRounded :: Stadium Huge :: Stadium Custom :: Stadium data Color Color :: String -> Color data Mask Mask :: [String] -> Mask data Disc Disc :: Word32 -> (Double, Double) -> (Double, Double) -> Double -> Double -> Double -> Double -> Color -> Mask -> Mask -> Disc discId :: Disc -> Word32 pos :: Disc -> (Double, Double) speed :: Disc -> (Double, Double) radius :: Disc -> Double bCoefficient :: Disc -> Double invMass :: Disc -> Double damping :: Disc -> Double color :: Disc -> Color mask :: Disc -> Mask group :: Disc -> Mask data Room Room :: ByteString -> Bool -> Word8 -> Word8 -> Word32 -> Bool -> Side -> (Double, Double) -> Word32 -> Word32 -> Double -> Word8 -> Stadium -> Room roomName :: Room -> ByteString locked :: Room -> Bool scoreLimit :: Room -> Word8 timeLimit :: Room -> Word8 rules :: Room -> Word32 kickoffTaken :: Room -> Bool kickoffSide :: Room -> Side ballCoords :: Room -> (Double, Double) redScore :: Room -> Word32 blueScore :: Room -> Word32 timer :: Room -> Double pauseTimer :: Room -> Word8 stadium :: Room -> Stadium data Player Player :: ByteString -> Bool -> Bool -> Side -> Word8 -> ByteString -> Word32 -> Bool -> Bool -> ByteString -> Word16 -> Word32 -> Player name :: Player -> ByteString initial :: Player -> Bool admin :: Player -> Bool team :: Player -> Side number :: Player -> Word8 avatar :: Player -> ByteString input :: Player -> Word32 autoKick :: Player -> Bool desync :: Player -> Bool country :: Player -> ByteString handicap :: Player -> Word16 pDiscId :: Player -> Word32 data Replay Replay :: Word32 -> Word32 -> Word32 -> Room -> Bool -> [Disc] -> IntMap Player -> [Action] -> Replay version :: Replay -> Word32 frameCount :: Replay -> Word32 firstFrame :: Replay -> Word32 room :: Replay -> Room inProgress :: Replay -> Bool discs :: Replay -> [Disc] players :: Replay -> IntMap Player events :: Replay -> [Action] instance Bounded Stadium instance Eq Stadium instance Enum Stadium instance Ord Stadium instance Show Stadium instance Show Color instance Show Mask instance Show Disc instance Show Room instance Show Player instance Show Replay instance Show Direction instance Show Move instance Show Side instance Show Event instance Show Action module HaxParse.Parser data ParserState ParserState :: Word32 -> Word32 -> IntMap Player -> ParserState _frame :: ParserState -> Word32 _curDiscId :: ParserState -> Word32 _playerList :: ParserState -> IntMap Player playerList :: Lens' ParserState (IntMap Player) frame :: Lens' ParserState Word32 curDiscId :: Lens' ParserState Word32 type Parser = Parsec ByteString ParserState parseFromFile :: Parser a -> FilePath -> IO (Either ParseError a) parseFile :: FilePath -> IO (Either ParseError Replay) haxParser :: Parser Replay room_ :: Parser Room int64 :: Parser Word64 double :: Parser Double int32 :: Parser Word32 int16 :: Parser Word16 int8 :: Parser Word8 str :: Parser ByteString bool :: Parser Bool side :: Parser Side stadium_ :: Parser Stadium discs_ :: Parser [Disc] disc :: Parser Disc mask_ :: Parser Mask players_ :: Parser () player :: Parser () event :: Parser Action departure :: Parser Event newPlayer :: Parser Event pingBroadcast :: Parser Event discMove :: Parser Event instance Monad m => Stream ByteString m Char instance Default ParserState