Safe Haskell | None |
---|---|
Language | Haskell2010 |
Rattletrap is a tool for parsing and generating Rocket League replays. It
is typically used as an executable; see Rattletrap.Main for details about
that interface. Using Rattletrap from Haskell is as easy as importing this
module. Together with Data.ByteString.Lazy and Data.Binary.Get, you can
decode a Replay
value. Then you can transform it into JSON with
Data.Aeson. For example:
let file = "path-to/some.replay" bytes <-readFile
file let replay =runGet
getReplay
bytes let json =encode
replayputStr
json
There are a few unusual aspects of Rattletrap to be aware of:
- In order to improve memory usage, everything Rattletrap does is strict. Don't expect any lazy values or evaluation.
- Some names, like
Text
, collide with commonly-used modules. Use qualified imports to avoid collisions. - No instances of
Binary
are provided. Use functions likegetReplay
instead. This was done to improve type inference and make profiling easier. Also some types require information that could not be provided by theBinary
interface. - Importing one specific module is not recommended because all JSON instances are defined as orphans in Rattletrap.Json.
Documentation
module Rattletrap.ActorMap
module Rattletrap.Attribute
module Rattletrap.AttributeMapping
module Rattletrap.AttributeType
module Rattletrap.AttributeValue
module Rattletrap.Cache
module Rattletrap.ClassAttributeMap
module Rattletrap.ClassMapping
module Rattletrap.Content
module Rattletrap.Crc
module Rattletrap.Data
module Rattletrap.Frame
module Rattletrap.Header
module Rattletrap.Helper
module Rattletrap.Initialization
module Rattletrap.KeyFrame
module Rattletrap.Main
module Rattletrap.Mark
module Rattletrap.Message
module Rattletrap.Primitive
module Rattletrap.Property
module Rattletrap.PropertyValue
module Rattletrap.RemoteId
module Rattletrap.Replay
module Rattletrap.Replication
module Rattletrap.ReplicationValue
module Rattletrap.Utility
module Rattletrap.Version