--------------------------------------------------------------------------------
encode :: Message -> ByteString
encode (Message p c ps) =
    encodePrefix' p <> encodeCommand c <> encodeParameters ps
  where
    encodePrefix' = fromMaybe mempty . fmap ((<> " ") . encodePrefix)
encode :: Message -> ByteString
encode (Message p c ps) =
    encodePrefix' p <> encodeCommand c <> encodeParameters ps
  where
    encodePrefix' = fromMaybe mempty . fmap ((<> " ") . encodePrefix)
encode (Message p c ps) =
    encodePrefix' p <> encodeCommand c <> encodeParameters ps
  where
    encodePrefix' = fromMaybe mempty . fmap ((<> " ") . encodePrefix)