| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rattletrap.Main
- main :: IO ()
- mainWithArgs :: [String] -> IO ()
- getIO :: [FilePath] -> IO (IO ByteString, ByteString -> IO ())
Documentation
Gets command-line arguments and passes them to mainWithArgs.
mainWithArgs :: [String] -> IO () Source #
Runs the main command-line interface. Can be used in one of three modes:
mainWithArgs ["version"]: Prints out the version number and exits. Mostly useful for debugging.mainWithArgs ["decode"]: Parses a raw replay into JSON. By default this reads from STDIN and writes to STDOUT. To read from a file, pass a second argument likemainWithArgs ["decode", "input.replay"]. To write to a file, pass a third argument likemainWithArgs ["decode", "input.replay", "output.json"].mainWithArgs ["encode"]: Generates a raw replay from JSON. The handling of input and output is the same as decoding.
getIO :: [FilePath] -> IO (IO ByteString, ByteString -> IO ()) Source #