我是haskell的新手,下面的代码
import Data.Attoparsec.Text.Lazy
import qualified Data.Text.Lazy as T
toEol :: Parser T.Text
toEol = takeTill isEndOfLine
产生以下错误消息:
Couldn't match type `Data.Text.Internal.Text' with `TL.Text'
Expected type: Parser TL.Text
Actual type: Parser Data.Text.Internal.Text
In the return type of a call of `takeTill'
In the expression: takeTill isEndOfLine
In an equation for `cell':
cell = takeTill isEndOfLine
Data.Text.Internal.Text 类型从何而来?导入 Data.Text 而不是 Data.Text.Lazy 似乎可以解决问题。