tfausak / rattletrap

:car: Parse and generate Rocket League replays.
https://hackage.haskell.org/package/rattletrap
MIT License
147 stars 21 forks source link

Add labels #232

Closed tfausak closed 3 years ago

tfausak commented 3 years ago

This addresses part of #230 and builds on #231. It will add labels to all the ByteGet and BitGet stuff. The idea is that if something goes wrong it should be very clear which part of the program is to blame.

tfausak commented 3 years ago

So labels on the frame stuff gets tricky. It's not actually a BitGet on the outside -- it's a StateT. I think I could flip it around to be a Get BitString (StateT ...) but that would require a fair amount of work. I could also add a custom user state to the Get thing, sort of like Parsec's Parser s u m a type.