payloadFromTypes :: Word32 -> Word16 -> [ArgTypeBox] -> A.Parser WireMessage
payloadFromTypes sender opcode types = do
  args <- mapM boxedParse types
  return WireMessage
    { wireMessageSender = sender
    , wireMessageOpcode = opcode
    , wireMessageArguments = args
    }

-- | Encode some argument values into a ByteString.
--
--   This does not produce a full wayland package. See 'Graphics.Sudbury.WirePackages.packBuilder'.
payloadFromTypes :: Word32 -> Word16 -> [ArgTypeBox] -> A.Parser WireMessage
payloadFromTypes sender opcode types = do
  args <- mapM boxedParse types
  return WireMessage
    { wireMessageSender = sender
    , wireMessageOpcode = opcode
    , wireMessageArguments = args
    }

-- | Encode some argument values into a ByteString.
--
--   This does not produce a full wayland package. See 'Graphics.Sudbury.WirePackages.packBuilder'.
payloadFromTypes sender opcode types = do
  args <- mapM boxedParse types
  return WireMessage
    { wireMessageSender = sender
    , wireMessageOpcode = opcode
    , wireMessageArguments = args
    }

-- | Encode some argument values into a ByteString.
--
--   This does not produce a full wayland package. See 'Graphics.Sudbury.WirePackages.packBuilder'.