我是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似乎解决了这个问题。