Haskell. TagSoup library with OverloadedStrings

Good afternoon, the question is pretty Nubian, but I'm stuck with it.

I decided to switch from simple lines to text in my project and ran into a problem, all lines in the source text gave compilation errors after adding {- # LANGUAGE OverloadedStrings # -} , for example, a fragment of the type:

dropWhile (~/= "<li>") tags

now leads to

An ambiguous variable of type t' in the constraints: Data.String.IsString t 'arising from the literal "<li>"' at ParserOx.hs:93:42-47 TagRep t' arising from the use of `~ == '

What could be wrong here?

UPD:

And yes, all my functions have signatures, for example:

getContainer :: [Tag Text] -> [Tag Text]
getContainer tags = 
  h
    where 
      (h:t) = sections (~== "<div id=\"itemscontainer\">") tags
+5
source share
3 answers

, - isstring, , tagrep, tagoup, . , "" ( tagoup) . , (.. (~/= ("<li>"::String))). inline , :

s :: String -> String
s = id
.... (~/= s "<li>") ...
+8

- ~==, . , :

(~===) a b = a ~== (b :: String)

(~=== "<div id=\"itemscontainer\">") - .

+3

, . .

0
source

All Articles