Compile error with Attoparsec Text Lazy

151 views Asked by At

I am new to haskell, and the code below

import Data.Attoparsec.Text.Lazy
import qualified Data.Text.Lazy as T

toEol :: Parser T.Text
toEol = takeTill isEndOfLine

produces the following error message:

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

Where does the type Data.Text.Internal.Text come from? Importing Data.Text instead of Data.Text.Lazy seems to solve the issue.

0

There are 0 answers