如果我尝试使用以下胡格尔命令(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]等
发布于 2014-06-16 07:26:32
Hoogle使用了"近似“类型匹配、泛化类型和剥离构造函数“的概念来查找紧密匹配。
https://stackoverflow.com/questions/24237365
复制相似问题