由 cabal 安装软件包:
All the requested packages are already installed:
tagsoup-0.12.8
我尝试编译:
module TagSoupSample where
import Data.Text
import Text.HTML.TagSoup
import Text.StringLike
foo :: Text -> [Tag Text]
foo = parseTags
这导致:
tagsoup.hs:7:7:
No instance for (StringLike Text)
arising from a use of `parseTags'
Possible fix: add an instance declaration for (StringLike Text)
In the expression: parseTags
In an equation for `foo': foo = parseTags
但是,http ://hackage.haskell.org/packages/archive/tagsoup/0.12.8/doc/html/Text-StringLike.html#t:StringLike说存在这样的实例。为什么我找不到除 StringLike String 之外的任何其他实例?
Prelude Data.Text> :info Text.StringLike.StringLike
class (Data.Typeable.Internal.Typeable a,
Eq a) => Text.StringLike.StringLike a where
Text.StringLike.empty :: a
Text.StringLike.cons :: Char -> a -> a
Text.StringLike.uncons :: a -> Maybe (Char, a)
Text.StringLike.toString :: a -> String
Text.StringLike.fromString :: String -> a
Text.StringLike.fromChar :: Char -> a
Text.StringLike.strConcat :: [a] -> a
Text.StringLike.strNull :: a -> Bool
Text.StringLike.append :: a -> a -> a
-- Defined in `Text.StringLike'
instance Text.StringLike.StringLike String
-- Defined in `Text.StringLike'
如何浏览已安装软件包的文档和来源?