0

如果我尝试使用以下Hoogle命令(v4.2.33)来搜索包含类型签名的函数ByteString->[ByteString]

hoogle --count 40 "ByteString->[ByteString]"

然后在输出结束时我得到:

Data.ByteString.Char8 transpose :: [ByteString] -> [ByteString]
Data.ByteString.Lazy transpose :: [ByteString] -> [ByteString]
Data.ByteString.Lazy.Char8 transpose :: [ByteString] -> [ByteString]
Codec.Compression.Zlib.Raw compress :: ByteString -> ByteString
Codec.Compression.GZip compress :: ByteString -> ByteString

ByteString -> ByteString当我将类型签名指定为时,为什么 Hoogle 会返回带有签名等的函数ByteString->[ByteString]

4

1 回答 1

2

Hoogle uses a concept of "approximate" type matching, generalizing types and stripping constructors to find close matches.

于 2014-06-16T07:26:32.947 回答