我(Haskell的新手)我试图对从网页收到的ByteString执行解包操作。基本上我想从网页搜索几个词,所以我试图标记化流,然后从单词中搜索单词。了解haskell中的错误
Prelude Network.HTTP.Conduit LB> LB.unpack (simpleHttp WebLink)
但我得到以下错误
<interactive>:75:12: error:
• Couldn't match expected type ‘LB.ByteString’
with actual type ‘m0 LB.ByteString’
• In the first argument of ‘LB.unpack’, namely...
从hackage我可以看到,它的签名是
unpack :: ByteString -> [Word8] Source
O(n) Converts a ByteString to a '[Word8]'.
托马斯感谢您的答复问题和解释。你能建议一些链接或一些例子来做你的建议吗? – Manvi