Data.Binary.Get と ByteString を使用しようとしていて、何が起こっているのか理解していません。私のコードは以下の通りです:
getSegmentParams :: Get (Int, L.ByteString)
getSegmentParams = do
seglen <- liftM fromIntegral getWord16be
params <- getByteString (seglen - 2)
return (seglen, params)
戻りタプルの 3 番目の項目、つまりペイロードに対して次のエラーが発生します。
Couldn't match expected type `L.ByteString'
against inferred type `bytestring-0.9.1.4:Data.ByteString.Internal.ByteString'
Data.Binary.Get と ByteStrings の間の相互作用と、意図したことを実行する方法を説明してください。ありがとう。