【发布时间】:2020-09-04 19:41:42
【问题描述】:
尝试来自split docs的示例:
$ stack ghci
...
Prelude> :set -XOverloadedStrings
Prelude> import qualified RIO.ByteString as B
Prelude B> B.split 'a' "aXaXaXa"
<interactive>:3:9: error:
• Couldn't match expected type ‘GHC.Word.Word8’
with actual type ‘Char’
• In the first argument of ‘B.split’, namely ‘'a'’
In the expression: B.split 'a' "aXaXaXa"
In an equation for ‘it’: it = B.split 'a' "aXaXaXa"
我错过了什么?
【问题讨论】: