main :: IO ()
main = do
  let safe   = Chunk (pack "1z") Empty
  let unsafe = Chunk (pack "2z") undefined
  print . fmap fst . readInt $ safe
  print . fmap fst . readInt $ unsafe
  print . fmap fst . readInteger $ safe
  print . fmap fst . readInteger $ unsafe
main :: IO ()
main = do
  let safe   = Chunk (pack "1z") Empty
  let unsafe = Chunk (pack "2z") undefined
  print . fmap fst . readInt $ safe
  print . fmap fst . readInt $ unsafe
  print . fmap fst . readInteger $ safe
  print . fmap fst . readInteger $ unsafe
main = do
  let safe   = Chunk (pack "1z") Empty
  let unsafe = Chunk (pack "2z") undefined
  print . fmap fst . readInt $ safe
  print . fmap fst . readInt $ unsafe
  print . fmap fst . readInteger $ safe
  print . fmap fst . readInteger $ unsafe